aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-08-26 10:42:06 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-08-26 10:42:06 +0100
commitc47c61be8dcd91689c8fc77776db924d684c3b39 (patch)
treeeaee80000dae1bd30bd1d9f228792e80c3fc4503 /hw
parenta44a12b78a7e9a3dc59e5b10b09a0bc934c693f1 (diff)
parentfe08275db9b88ecf3a30c7540b894c25aec150c2 (diff)
downloadqemu-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.c8
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;
}