Skip to content

Commit

Permalink
vfio/pci-quirks: Exclude non-ioport BAR from NVIDIA quirk
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
awilliam committed Apr 6, 2017
1 parent 54d6899 commit 8f419c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/vfio/pci-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8f419c5

Please sign in to comment.