summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Include/Library/VirtioLib.h
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2017-08-23 06:57:18 -0400
committerLaszlo Ersek <lersek@redhat.com>2017-08-25 10:42:19 +0200
commitb0338c53297cfbabd727f36c4878379c86cf4ddc (patch)
treec69e78fd99fa8db762b86a9968bf427cd890ecb1 /OvmfPkg/Include/Library/VirtioLib.h
parentfef6becb55355c2f6cf0a99f6e7e564d3165ee49 (diff)
downloadedk2-b0338c53297cfbabd727f36c4878379c86cf4ddc.tar.gz
edk2-b0338c53297cfbabd727f36c4878379c86cf4ddc.tar.bz2
edk2-b0338c53297cfbabd727f36c4878379c86cf4ddc.zip
OvmfPkg/VirtioLib: alloc VRING buffer with AllocateSharedPages()
The VRING buffer is a communication area between guest and hypervisor. Allocate it using VIRTIO_DEVICE_PROTOCOL.AllocateSharedPages() so that it can be mapped later with VirtioRingMap() for bi-directional access. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Brijesh Singh <brijesh.singh@amd.com> [lersek@redhat.com: correct typo in VirtioRingInit() comment blocks] Reviewed-by: Laszlo Ersek <lersek@redhat.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/Include/Library/VirtioLib.h')
-rw-r--r--OvmfPkg/Include/Library/VirtioLib.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/OvmfPkg/Include/Library/VirtioLib.h b/OvmfPkg/Include/Library/VirtioLib.h
index 6a422deba2..547b4ee497 100644
--- a/OvmfPkg/Include/Library/VirtioLib.h
+++ b/OvmfPkg/Include/Library/VirtioLib.h
@@ -42,9 +42,8 @@
@param[out] Ring The virtio ring to set up.
- @retval EFI_OUT_OF_RESOURCES AllocatePages() failed to allocate contiguous
- pages for the requested QueueSize. Fields of
- Ring have indeterminate value.
+ @return Status codes propagated from
+ VirtIo->AllocateSharedPages().
@retval EFI_SUCCESS Allocation and setup successful. Ring->Base
(and nothing else) is responsible for