From 78ef454b8c6108d330e066653039ad824cc041f1 Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Mon, 14 Aug 2017 07:36:23 -0400 Subject: [PATCH] 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 --- OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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; } -- 2.39.2