goto Failed;\r
}\r
\r
- Features &= VIRTIO_F_VERSION_1;\r
+ Features &= VIRTIO_F_VERSION_1 | VIRTIO_F_IOMMU_PLATFORM;\r
\r
//\r
// In virtio-1.0, feature negotiation is expected to complete before queue\r
// step 5 -- Report understood features and guest-tuneables.\r
//\r
if (Dev->VirtIo->Revision < VIRTIO_SPEC_REVISION (1, 0, 0)) {\r
- Features &= ~(UINT64)VIRTIO_F_VERSION_1;\r
+ Features &= ~(UINT64)(VIRTIO_F_VERSION_1 | VIRTIO_F_IOMMU_PLATFORM);\r
Status = Dev->VirtIo->SetGuestFeatures (Dev->VirtIo, Features);\r
if (EFI_ERROR (Status)) {\r
goto UnmapQueue;\r
{\r
VIRTIO_RNG_DEV *Dev;\r
\r
+ DEBUG ((DEBUG_VERBOSE, "%a: Context=0x%p\n", __FUNCTION__, Context));\r
//\r
// Reset the device. This causes the hypervisor to forget about the virtio\r
// ring.\r
//\r
Dev = Context;\r
Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0);\r
-\r
- //\r
- // Unmap the ring buffer so that hypervisor will not be able to get readable\r
- // data after device reset.\r
- //\r
- Dev->VirtIo->UnmapSharedBuffer (Dev->VirtIo, Dev->RingMap);\r
}\r
\r
\r