Skip to content

Commit

Permalink
vfio: Enable NVIDIA 88000 region quirk regardless of VGA
Browse files Browse the repository at this point in the history
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 <alex.williamson@redhat.com>
  • Loading branch information
awilliam committed Aug 25, 2014
1 parent 3dd359c commit fe08275
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions hw/misc/vfio.c
Expand Up @@ -2194,9 +2194,13 @@ static void vfio_probe_nvidia_bar0_88000_quirk(VFIODevice *vdev, int nr)
{ {
PCIDevice *pdev = &vdev->pdev; PCIDevice *pdev = &vdev->pdev;
VFIOQuirk *quirk; VFIOQuirk *quirk;
uint16_t vendor, class;


if (!vdev->has_vga || nr != 0 || vendor = pci_get_word(pdev->config + PCI_VENDOR_ID);
pci_get_word(pdev->config + PCI_VENDOR_ID) != PCI_VENDOR_ID_NVIDIA) { class = pci_get_word(pdev->config + PCI_CLASS_DEVICE);

if (nr != 0 || vendor != PCI_VENDOR_ID_NVIDIA ||
class != PCI_CLASS_DISPLAY_VGA) {
return; return;
} }


Expand Down

0 comments on commit fe08275

Please sign in to comment.