summaryrefslogtreecommitdiff
path: root/OvmfPkg/Include
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2017-08-23 06:57:17 -0400
committerLaszlo Ersek <lersek@redhat.com>2017-08-25 10:42:18 +0200
commitfc2c1543e51ee6fc8a2956594456eb4db5f0a3ca (patch)
tree9a26be6f83258a229da867a2c2714e221378e817 /OvmfPkg/Include
parent0a78d754edc82ed0dae07c3d505b88fce8b5bd09 (diff)
downloadedk2-fc2c1543e51ee6fc8a2956594456eb4db5f0a3ca.zip
edk2-fc2c1543e51ee6fc8a2956594456eb4db5f0a3ca.tar.gz
edk2-fc2c1543e51ee6fc8a2956594456eb4db5f0a3ca.tar.bz2
OvmfPkg/VirtioLib: take VirtIo instance in VirtioRingInit/VirtioRingUninit
Passing the VirtIo protocol instance will allow the vring to use VIRTIO_DEVICE_PROTOCOL.AllocateSharedPages () to allocate vring buffer. 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> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'OvmfPkg/Include')
-rw-r--r--OvmfPkg/Include/Library/VirtioLib.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/OvmfPkg/Include/Library/VirtioLib.h b/OvmfPkg/Include/Library/VirtioLib.h
index 660ea27..929e00c 100644
--- a/OvmfPkg/Include/Library/VirtioLib.h
+++ b/OvmfPkg/Include/Library/VirtioLib.h
@@ -35,6 +35,8 @@
- 1.1 Virtqueues,
- 2.3 Virtqueue Configuration.
+ @param[in] VirtIo The virtio device which will use the ring.
+
@param[in] The number of descriptors to allocate for the
virtio ring, as requested by the host.
@@ -52,8 +54,9 @@
EFI_STATUS
EFIAPI
VirtioRingInit (
- IN UINT16 QueueSize,
- OUT VRING *Ring
+ IN VIRTIO_DEVICE_PROTOCOL *VirtIo,
+ IN UINT16 QueueSize,
+ OUT VRING *Ring
);
@@ -65,13 +68,16 @@ VirtioRingInit (
invoking this function: the VSTAT_DRIVER_OK bit must be clear in
VhdrDeviceStatus.
- @param[out] Ring The virtio ring to clean up.
+ @param[in] VirtIo The virtio device which was using the ring.
+
+ @param[out] Ring The virtio ring to clean up.
**/
VOID
EFIAPI
VirtioRingUninit (
- IN OUT VRING *Ring
+ IN VIRTIO_DEVICE_PROTOCOL *VirtIo,
+ IN OUT VRING *Ring
);