diff options
| author | Peter Maydell | 2014-08-26 11:42:06 +0200 |
|---|---|---|
| committer | Peter Maydell | 2014-08-26 11:42:06 +0200 |
| commit | c47c61be8dcd91689c8fc77776db924d684c3b39 (patch) | |
| tree | eaee80000dae1bd30bd1d9f228792e80c3fc4503 | |
| parent | Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (diff) | |
| parent | vfio: Enable NVIDIA 88000 region quirk regardless of VGA (diff) | |
| download | qemu-c47c61be8dcd91689c8fc77776db924d684c3b39.tar.gz qemu-c47c61be8dcd91689c8fc77776db924d684c3b39.tar.xz qemu-c47c61be8dcd91689c8fc77776db924d684c3b39.zip | |
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-pci-for-qemu-20140825.0' into staging
VFIO: Enable primary NVIDIA quirk regardless of VGA support
# gpg: Signature made Mon 25 Aug 2014 20:29:37 BST using RSA key ID 3BB08B22
# gpg: Can't check signature: public key not found
* remotes/awilliam/tags/vfio-pci-for-qemu-20140825.0:
vfio: Enable NVIDIA 88000 region quirk regardless of VGA
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| -rw-r--r-- | hw/misc/vfio.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index 0617b70ea6..40dcaa6558 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; } |
