From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEkgG-0002DC-G1 for qemu-devel@nongnu.org; Tue, 05 Aug 2014 15:46:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEkgA-0004pK-7D for qemu-devel@nongnu.org; Tue, 05 Aug 2014 15:45:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEkg9-0004pE-W1 for qemu-devel@nongnu.org; Tue, 05 Aug 2014 15:45:50 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s75JjnWC018610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 5 Aug 2014 15:45:49 -0400 From: Alex Williamson Date: Tue, 05 Aug 2014 13:45:48 -0600 Message-ID: <20140805194522.821.23144.stgit@gimli.home> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] vfio: Enable NVIDIA 88000 region quirk regardless of VGA List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: alex.williamson@redhat.com 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 --- 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; }