diff options
author | Brijesh Singh <brijesh.singh@amd.com> | 2017-08-23 06:57:17 -0400 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2017-08-25 10:42:18 +0200 |
commit | fc2c1543e51ee6fc8a2956594456eb4db5f0a3ca (patch) | |
tree | 9a26be6f83258a229da867a2c2714e221378e817 /OvmfPkg/VirtioRngDxe | |
parent | 0a78d754edc82ed0dae07c3d505b88fce8b5bd09 (diff) | |
download | edk2-fc2c1543e51ee6fc8a2956594456eb4db5f0a3ca.tar.gz edk2-fc2c1543e51ee6fc8a2956594456eb4db5f0a3ca.tar.bz2 edk2-fc2c1543e51ee6fc8a2956594456eb4db5f0a3ca.zip |
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/VirtioRngDxe')
-rw-r--r-- | OvmfPkg/VirtioRngDxe/VirtioRng.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OvmfPkg/VirtioRngDxe/VirtioRng.c b/OvmfPkg/VirtioRngDxe/VirtioRng.c index 1a186d0408..e20602ac72 100644 --- a/OvmfPkg/VirtioRngDxe/VirtioRng.c +++ b/OvmfPkg/VirtioRngDxe/VirtioRng.c @@ -6,6 +6,7 @@ Copyright (C) 2012, Red Hat, Inc.
Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017, AMD Inc, All rights reserved.<BR>
This driver:
@@ -275,7 +276,7 @@ VirtioRngInit ( goto Failed;
}
- Status = VirtioRingInit (QueueSize, &Dev->Ring);
+ Status = VirtioRingInit (Dev->VirtIo, QueueSize, &Dev->Ring);
if (EFI_ERROR (Status)) {
goto Failed;
}
@@ -331,7 +332,7 @@ VirtioRngInit ( return EFI_SUCCESS;
ReleaseQueue:
- VirtioRingUninit (&Dev->Ring);
+ VirtioRingUninit (Dev->VirtIo, &Dev->Ring);
Failed:
//
@@ -358,7 +359,7 @@ VirtioRngUninit ( // the old comms area.
//
Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0);
- VirtioRingUninit (&Dev->Ring);
+ VirtioRingUninit (Dev->VirtIo, &Dev->Ring);
}
//
|