summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtioRngDxe
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2017-08-25 06:37:47 -0400
committerLaszlo Ersek <lersek@redhat.com>2017-08-25 16:19:57 +0200
commit4bef13da0022e3a748f9e6afc8ff197c2fb6764c (patch)
tree9167a02435da52bfca46c4ae5b8a70314f7c3596 /OvmfPkg/VirtioRngDxe
parent4fb268029e2263eecac8250496e05fc309e770c6 (diff)
downloadedk2-4bef13da0022e3a748f9e6afc8ff197c2fb6764c.tar.gz
edk2-4bef13da0022e3a748f9e6afc8ff197c2fb6764c.tar.bz2
edk2-4bef13da0022e3a748f9e6afc8ff197c2fb6764c.zip
OvmfPkg/VirtioRngDxe: negotiate VIRTIO_F_IOMMU_PLATFORM
VirtioRngDxe driver has been updated to use IOMMU-like member functions from VIRTIO_DEVICE_PROTOCOL to translate the system physical address to device address. We do not need to do anything special when VIRTIO_F_IOMMU_PLATFORM bit is present hence treat it in parallel with VIRTIO_F_VERSION_1. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/OvmfPkg/VirtioRngDxe/VirtioRng.c b/OvmfPkg/VirtioRngDxe/VirtioRng.c
index 4e67997881..80380bcdf8 100644
--- a/OvmfPkg/VirtioRngDxe/VirtioRng.c
+++ b/OvmfPkg/VirtioRngDxe/VirtioRng.c
@@ -279,7 +279,7 @@ VirtioRngInit (
goto Failed;
}
- Features &= VIRTIO_F_VERSION_1;
+ Features &= VIRTIO_F_VERSION_1 | VIRTIO_F_IOMMU_PLATFORM;
//
// In virtio-1.0, feature negotiation is expected to complete before queue
@@ -360,7 +360,7 @@ VirtioRngInit (
// step 5 -- Report understood features and guest-tuneables.
//
if (Dev->VirtIo->Revision < VIRTIO_SPEC_REVISION (1, 0, 0)) {
- Features &= ~(UINT64)VIRTIO_F_VERSION_1;
+ Features &= ~(UINT64)(VIRTIO_F_VERSION_1 | VIRTIO_F_IOMMU_PLATFORM);
Status = Dev->VirtIo->SetGuestFeatures (Dev->VirtIo, Features);
if (EFI_ERROR (Status)) {
goto UnmapQueue;