diff options
| author | Alex Williamson <alex.williamson@redhat.com> | 2017-04-06 16:03:26 -0600 |
|---|---|---|
| committer | Alex Williamson <alex.williamson@redhat.com> | 2017-04-06 16:03:26 -0600 |
| commit | 8f419c5b43b988df4ef11315aeb8524e50c99687 (patch) | |
| tree | 012ea99abecf32424341c39e7553274c5ddb8835 /hw/vfio/pci-quirks.c | |
| parent | 54d689988c847271d87b3eb113712147129fb811 (diff) | |
| download | focaccia-qemu-8f419c5b43b988df4ef11315aeb8524e50c99687.tar.gz focaccia-qemu-8f419c5b43b988df4ef11315aeb8524e50c99687.zip | |
vfio/pci-quirks: Exclude non-ioport BAR from NVIDIA quirk
The NVIDIA BAR5 quirk is targeting an ioport BAR. Some older devices have a BAR5 which is not ioport and can induce a segfault here. Test the BAR type to skip these devices. Link: https://bugs.launchpad.net/qemu/+bug/1678466 Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio/pci-quirks.c')
| -rw-r--r-- | hw/vfio/pci-quirks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c index e9b493b939..349085ea12 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -660,7 +660,7 @@ static void vfio_probe_nvidia_bar5_quirk(VFIOPCIDevice *vdev, int nr) VFIOConfigWindowQuirk *window; if (!vfio_pci_is(vdev, PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID) || - !vdev->vga || nr != 5) { + !vdev->vga || nr != 5 || !vdev->bars[5].ioport) { return; } |