X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=OvmfPkg%2FVirtioRngDxe%2FVirtioRng.c;h=3c733ea4db6666b8a7e29dfd5be42cd1ee3e7bfb;hp=4e679978810563b90b47a41a3b3b1cbb5285d535;hb=76c09700edc67686b29662e81a3ca7d947594ce5;hpb=0a568ccbcbd13751b92438c000df79c0d6c2d8f9 diff --git a/OvmfPkg/VirtioRngDxe/VirtioRng.c b/OvmfPkg/VirtioRngDxe/VirtioRng.c index 4e67997881..3c733ea4db 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; @@ -435,6 +435,7 @@ VirtioRngExitBoot ( { VIRTIO_RNG_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. @@ -444,12 +445,6 @@ VirtioRngExitBoot ( // 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); }