summaryrefslogtreecommitdiffstats
path: root/OvmfPkg
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2017-08-14 07:36:23 -0400
committerLaszlo Ersek <lersek@redhat.com>2017-08-15 21:20:16 +0200
commit78ef454b8c6108d330e066653039ad824cc041f1 (patch)
tree026b8f5fa9f6b20972133a18f9908d6a933e2689 /OvmfPkg
parentaf0364f01e8cac95afad01437f13beef90f6640b (diff)
downloadedk2-78ef454b8c6108d330e066653039ad824cc041f1.tar.gz
edk2-78ef454b8c6108d330e066653039ad824cc041f1.tar.bz2
edk2-78ef454b8c6108d330e066653039ad824cc041f1.zip
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 <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>
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c10
1 files 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;
}