diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-08-26 10:42:06 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-08-26 10:42:06 +0100 |
commit | c47c61be8dcd91689c8fc77776db924d684c3b39 (patch) | |
tree | eaee80000dae1bd30bd1d9f228792e80c3fc4503 /hw | |
parent | a44a12b78a7e9a3dc59e5b10b09a0bc934c693f1 (diff) | |
parent | fe08275db9b88ecf3a30c7540b894c25aec150c2 (diff) | |
download | qemu-c47c61be8dcd91689c8fc77776db924d684c3b39.zip qemu-c47c61be8dcd91689c8fc77776db924d684c3b39.tar.gz qemu-c47c61be8dcd91689c8fc77776db924d684c3b39.tar.bz2 |
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>
Diffstat (limited to 'hw')
-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 0617b70..40dcaa6 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; } |