qemu-e2k/hw
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
..
9pfs 9pfs: make Error **errp const where it is appropriate 2019-12-18 08:43:19 +01:00
acpi * More uses of RCU_READ_LOCK_GUARD (Dave, myself) 2019-12-20 11:20:25 +00:00
adc
alpha hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
arm hw/arm/nseries: Replace the bluetooth chardev with a "null" chardev 2019-12-16 17:24:07 +01:00
audio hw/audio: Remove the "use_broken_id" hack from the AC97 device 2019-12-18 02:34:12 +01:00
block
bt Remove the core bluetooth code 2019-12-17 09:01:14 +01:00
char
core * More uses of RCU_READ_LOCK_GUARD (Dave, myself) 2019-12-20 11:20:25 +00:00
cpu
cris
display vga: cleanup mapping of VRAM for non-PCI VGA 2019-12-18 02:34:13 +01:00
dma mips: jazz: Renovate coding style 2019-12-16 13:04:46 +01:00
gpio gpio: fix memory leak in aspeed_gpio_init() 2019-12-16 10:46:34 +00:00
hppa hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
hyperv hyperv: Use auto rcu_read macros 2019-12-17 19:33:52 +01:00
i2c
i386 * More uses of RCU_READ_LOCK_GUARD (Dave, myself) 2019-12-20 11:20:25 +00:00
ide
input hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
intc * More uses of RCU_READ_LOCK_GUARD (Dave, myself) 2019-12-20 11:20:25 +00:00
ipack
ipmi hw/ipmi: Fix realize() error API violations 2019-12-18 08:36:15 +01:00
isa hw/isa/isa-bus: cleanup irq functions 2019-12-17 19:33:51 +01:00
lm32
m68k
mem memory-device: Fix memory pre-plug error API violations 2019-12-18 08:36:15 +01:00
microblaze
mips hw: replace hw/i386/pc.h with a header just for the i8259 2019-12-17 19:33:49 +01:00
misc hw/misc/ivshmem: Bury dead legacy INTx code 2019-12-17 09:05:23 +01:00
moxie
net MIPS queue for December 16th, 2019 2019-12-16 14:07:56 +00:00
nios2
nubus
nvram
openrisc
pci hw/pci: Remove the "command_serr_enable" property 2019-12-18 02:34:12 +01:00
pci-bridge
pci-host hw/pci-host: Add Kconfig entry to select the IGD Passthrough Host Bridge 2019-12-18 02:34:12 +01:00
pcmcia
ppc * More uses of RCU_READ_LOCK_GUARD (Dave, myself) 2019-12-20 11:20:25 +00:00
rdma
riscv
rtc
s390x hw/s390x: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
scsi
sd hw/sd: drop extra whitespace in sdhci_sysbus_realize() header 2019-12-18 08:43:19 +01:00
semihosting
sh4
smbios
sparc
sparc64
ssi aspeed/smc: Add AST2600 timings registers 2019-12-16 10:46:34 +00:00
timer aspeed: Change the "scu" property definition 2019-12-16 10:46:34 +00:00
tpm hw/tpm: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
tricore
unicore32
usb hw/usb: rename Error ** parameter to more common errp 2019-12-18 08:43:19 +01:00
vfio vfio/pci: Don't remove irqchip notifier if not registered 2020-01-06 14:19:42 -07:00
virtio configure: simplify vhost condition with Kconfig 2019-12-17 19:32:48 +01:00
watchdog aspeed: Change the "scu" property definition 2019-12-16 10:46:34 +00:00
xen xen: convert "-machine igd-passthru" to an accelerator property 2019-12-17 19:32:27 +01:00
xenpv
xtensa
Kconfig Remove the core bluetooth code 2019-12-17 09:01:14 +01:00
Makefile.objs Remove the core bluetooth code 2019-12-17 09:01:14 +01:00