diff options
author | Vasilis Liaskovitis <vliaskovitis@suse.com> | 2025-03-11 00:58:33 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2025-03-11 17:01:15 +0100 |
commit | 63316f973ad9f1465b1cb820c5be954260663c8a (patch) | |
tree | 659c1b5baec25fd606189674e0e7e9c70903ca4f /hw/vfio | |
parent | 28ea52dd639b75e212ad32cc704a1dd212286914 (diff) | |
download | qemu-63316f973ad9f1465b1cb820c5be954260663c8a.zip qemu-63316f973ad9f1465b1cb820c5be954260663c8a.tar.gz qemu-63316f973ad9f1465b1cb820c5be954260663c8a.tar.bz2 |
vfio/pci-quirks: Exclude non-ioport BAR from ATI quirk
The ATI BAR4 quirk is targeting an ioport BAR. Older devices may
have a BAR4 which is not an ioport, causing a segfault here. Test
the BAR type to skip these devices.
Similar to
"8f419c5b: vfio/pci-quirks: Exclude non-ioport BAR from NVIDIA quirk"
Untested, as I don't have the card to test.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2856
Signed-off-by: Vasilis Liaskovitis <vliaskovitis@suse.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20250310235833.41026-1-vliaskovitis@suse.com
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'hw/vfio')
-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 f998761..3f00225 100644 --- a/hw/vfio/pci-quirks.c +++ b/hw/vfio/pci-quirks.c @@ -403,7 +403,7 @@ static void vfio_probe_ati_bar4_quirk(VFIOPCIDevice *vdev, int nr) /* This windows doesn't seem to be used except by legacy VGA code */ if (!vfio_pci_is(vdev, PCI_VENDOR_ID_ATI, PCI_ANY_ID) || - !vdev->vga || nr != 4) { + !vdev->vga || nr != 4 || !vdev->bars[4].ioport) { return; } |