qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] vfio: Enable NVIDIA 88000 region quirk regardless o


From: Alex Williamson
Subject: [Qemu-devel] [PATCH] vfio: Enable NVIDIA 88000 region quirk regardless of VGA
Date: Tue, 05 Aug 2014 13:45:48 -0600
User-agent: StGIT/0.14.3

If we make use of OVMF for the BIOS then we can use GPUs without VGA
space access, but we still need this quirk.  Disassociate it from the
x-vga option and enable it on all NVIDIA VGA display class devices.

Signed-off-by: Alex Williamson <address@hidden>
---

 hw/misc/vfio.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index ba08adb..4f88fe6 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -2194,9 +2194,13 @@ static void 
vfio_probe_nvidia_bar0_88000_quirk(VFIODevice *vdev, int nr)
 {
     PCIDevice *pdev = &vdev->pdev;
     VFIOQuirk *quirk;
+    uint16_t vendor, class;
 
-    if (!vdev->has_vga || nr != 0 ||
-        pci_get_word(pdev->config + PCI_VENDOR_ID) != PCI_VENDOR_ID_NVIDIA) {
+    vendor = pci_get_word(pdev->config + PCI_VENDOR_ID);
+    class = pci_get_word(pdev->config + PCI_CLASS_DEVICE);
+
+    if (nr != 0 || vendor != PCI_VENDOR_ID_NVIDIA ||
+        class != PCI_CLASS_DISPLAY_VGA) {
         return;
     }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]