]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/VirtioPciDeviceDxe: supply missing BUS_MASTER attribute
authorBrijesh Singh <brijesh.singh@amd.com>
Mon, 14 Aug 2017 11:36:23 +0000 (07:36 -0400)
committerLaszlo Ersek <lersek@redhat.com>
Tue, 15 Aug 2017 19:20:16 +0000 (21:20 +0200)
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 <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
[lersek@redhat.com: expand commit message body]
[lersek@redhat.com: fix up line breaking style (original code too)]
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c

index bc4f6fe8bfa3a55cb22a17e596a2a656fe55090d..8aae58e8b482e8c735c9020c7c14387bf226cf93 100644 (file)
@@ -458,9 +458,13 @@ VirtioPciDeviceBindingStart (
     goto ClosePciIo;\r
   }\r
 \r
-  Status = Device->PciIo->Attributes (Device->PciIo,\r
-                         EfiPciIoAttributeOperationEnable,\r
-                         EFI_PCI_IO_ATTRIBUTE_IO, NULL);\r
+  Status = Device->PciIo->Attributes (\r
+                            Device->PciIo,\r
+                            EfiPciIoAttributeOperationEnable,\r
+                            (EFI_PCI_IO_ATTRIBUTE_IO |\r
+                             EFI_PCI_IO_ATTRIBUTE_BUS_MASTER),\r
+                            NULL\r
+                            );\r
   if (EFI_ERROR (Status)) {\r
     goto ClosePciIo;\r
   }\r