qemu-e2k/hw/vfio
Peter Xu 0446f81217 vfio/pci: Don't remove irqchip notifier if not registered
The kvm irqchip notifier is only registered if the device supports
INTx, however it's unconditionally removed.  If the assigned device
does not support INTx, this will cause QEMU to crash when unplugging
the device from the system.  Change it to conditionally remove the
notifier only if the notify hook is setup.

CC: Eduardo Habkost <ehabkost@redhat.com>
CC: David Gibson <david@gibson.dropbear.id.au>
CC: Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-stable@nongnu.org # v4.2
Reported-by: yanghliu@redhat.com
Debugged-by: Eduardo Habkost <ehabkost@redhat.com>
Fixes: c5478fea27 ("vfio/pci: Respond to KVM irqchip change notifier")
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1782678
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2020-01-06 14:19:42 -07:00
..
amd-xgbe.c
ap.c hw/vfio/ap: drop local_err from vfio_ap_realize 2019-12-18 08:43:19 +01:00
calxeda-xgmac.c
ccw.c vfio-ccw: Fix error message 2019-12-14 10:22:38 +01:00
common.c
display.c
Kconfig vfio: vfio-pci requires EDID 2019-11-18 10:41:49 -07:00
Makefile.objs
pci-quirks.c
pci.c vfio/pci: Don't remove irqchip notifier if not registered 2020-01-06 14:19:42 -07:00
pci.h vfio/pci: Respond to KVM irqchip change notifier 2019-11-26 10:11:30 +11:00
platform.c
spapr.c core: replace getpagesize() with qemu_real_host_page_size 2019-10-26 15:38:06 +02:00
trace-events