From: Brijesh Singh Date: Mon, 14 Aug 2017 11:36:23 +0000 (-0400) Subject: OvmfPkg/VirtioPciDeviceDxe: supply missing BUS_MASTER attribute X-Git-Tag: edk2-stable201903~3637 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=78ef454b8c6108d330e066653039ad824cc041f1 OvmfPkg/VirtioPciDeviceDxe: supply missing BUS_MASTER attribute Virtio devices read and write guest RAM (they don't just decode their IO and/or MMIO BARs), which translates to "bus master". Suggested-by: Laszlo Ersek Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Tom Lendacky Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Brijesh Singh [lersek@redhat.com: expand commit message body] [lersek@redhat.com: fix up line breaking style (original code too)] Reviewed-by: Laszlo Ersek Regression-tested-by: Laszlo Ersek --- diff --git a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c index bc4f6fe8bf..8aae58e8b4 100644 --- a/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c +++ b/OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c @@ -458,9 +458,13 @@ VirtioPciDeviceBindingStart ( goto ClosePciIo; } - Status = Device->PciIo->Attributes (Device->PciIo, - EfiPciIoAttributeOperationEnable, - EFI_PCI_IO_ATTRIBUTE_IO, NULL); + Status = Device->PciIo->Attributes ( + Device->PciIo, + EfiPciIoAttributeOperationEnable, + (EFI_PCI_IO_ATTRIBUTE_IO | + EFI_PCI_IO_ATTRIBUTE_BUS_MASTER), + NULL + ); if (EFI_ERROR (Status)) { goto ClosePciIo; }