diff options
author | Brijesh Singh <brijesh.singh@amd.com> | 2017-08-27 18:53:32 -0400 |
---|---|---|
committer | Laszlo Ersek <lersek@redhat.com> | 2017-08-28 11:00:14 +0200 |
commit | dd4205f8ba41282c8afb4805aed3e34f16aaa7f2 (patch) | |
tree | ebca3b353e6981f8ec6327006af6eb325666bebb /OvmfPkg/VirtioBlkDxe/VirtioBlk.c | |
parent | 3540f2cef57afc08f18fe4db971f3b0e06b49d63 (diff) | |
download | edk2-dd4205f8ba41282c8afb4805aed3e34f16aaa7f2.tar.gz edk2-dd4205f8ba41282c8afb4805aed3e34f16aaa7f2.tar.bz2 edk2-dd4205f8ba41282c8afb4805aed3e34f16aaa7f2.zip |
OvmfPkg/VirtioBlkDxe: negotiate VIRTIO_F_IOMMU_PLATFORM
VirtioBlkDxe 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/VirtioBlkDxe/VirtioBlk.c')
-rw-r--r-- | OvmfPkg/VirtioBlkDxe/VirtioBlk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c index c9c42aa412..6abd937f86 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c @@ -808,7 +808,8 @@ VirtioBlkInit ( }
Features &= VIRTIO_BLK_F_BLK_SIZE | VIRTIO_BLK_F_TOPOLOGY | VIRTIO_BLK_F_RO |
- VIRTIO_BLK_F_FLUSH | VIRTIO_F_VERSION_1;
+ VIRTIO_BLK_F_FLUSH | VIRTIO_F_VERSION_1 |
+ VIRTIO_F_IOMMU_PLATFORM;
//
// In virtio-1.0, feature negotiation is expected to complete before queue
@@ -886,7 +887,7 @@ VirtioBlkInit ( // step 5 -- Report understood features.
//
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;
|