summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2017-09-07 14:24:22 +0200
committerLaszlo Ersek <lersek@redhat.com>2017-09-08 20:23:58 +0200
commitbf99bdd1f7d442e23397ee40af1631be4924e71a (patch)
treec625355d2835d9768225c7499aecfbb97d86dc38 /OvmfPkg
parent21e57370fc238735d01bd0bb852003e0e0bfe36f (diff)
downloadedk2-bf99bdd1f7d442e23397ee40af1631be4924e71a.tar.gz
edk2-bf99bdd1f7d442e23397ee40af1631be4924e71a.tar.bz2
edk2-bf99bdd1f7d442e23397ee40af1631be4924e71a.zip
OvmfPkg/VirtioScsiDxe: don't unmap VRING at ExitBootServices()
In one of the following patches, we'll change OvmfPkg/IoMmuDxe so that it unmaps all existent bus master operations (CommonBuffer, Read, Write) at ExitBootServices(), strictly after the individual device drivers abort pending DMA on the devices they manage, in their own ExitBootServices() notification functions. In preparation, remove the explicit VIRTIO_DEVICE_PROTOCOL.UnmapSharedBuffer() call from VirtioScsiExitBoot(), originally added in commit fc2168feb248 ("OvmfPkg/VirtioScsiDxe: map VRING using VirtioRingMap()", 2017-08-31). Add a DEBUG message so we can observe the ordering between VirtioScsiExitBoot() and the upcoming cleanup of mappings in OvmfPkg/IoMmuDxe. Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Brijesh Singh <brijesh.singh@amd.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Brijesh Singh <brijesh.singh@amd.com> Tested-by: Brijesh Singh <brijesh.singh@amd.com>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/VirtioScsiDxe/VirtioScsi.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
index 7b8c3d22c8..1a68f06210 100644
--- a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
+++ b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c
@@ -1223,6 +1223,7 @@ VirtioScsiExitBoot (
{
VSCSI_DEV *Dev;
+ DEBUG ((DEBUG_VERBOSE, "%a: Context=0x%p\n", __FUNCTION__, Context));
//
// Reset the device. This causes the hypervisor to forget about the virtio
// ring.
@@ -1232,12 +1233,6 @@ VirtioScsiExitBoot (
//
Dev = Context;
Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0);
-
- //
- // Unmap the ring buffer so that hypervisor will not be able to get
- // readable data after device reset.
- //
- Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->RingMap);
}