qemu-e2k/hw/misc
Ladi Prosek 089fd80376 ivshmem: Always remove irqfd notifiers
As of commit 660c97eef6 ("ivshmem: use kvm irqfd for msi notifications"),
QEMU crashes with:

ivshmem: msix_set_vector_notifiers failed
msix_unset_vector_notifiers: Assertion `dev->msix_vector_use_notifier && dev->msix_vector_release_notifier' failed.

if MSI-X is repeatedly enabled and disabled on the ivshmem device, for example
by loading and unloading the Windows ivshmem driver. This is because
msix_unset_vector_notifiers() doesn't call any of the release notifier callbacks
since MSI-X is already disabled at that point (msix_enabled() returning false
is how this transition is detected in the first place). Thus ivshmem_vector_mask()
doesn't run and when MSI-X is subsequently enabled again ivshmem_vector_unmask()
fails.

This is fixed by keeping track of unmasked vectors and making sure that
ivshmem_vector_mask() always runs on MSI-X disable.

Fixes: 660c97eef6 ("ivshmem: use kvm irqfd for msi notifications")
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20171211072110.9058-3-lprosek@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-02-07 14:09:24 +01:00
..
macio maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
a9scu.c
applesmc.c
arm11scu.c
arm_integrator_debug.c
arm_l2x0.c
arm_sysctl.c
aspeed_scu.c hw/arm/aspeed: Unlock SCU when running kernel 2017-11-20 13:47:49 +00:00
aspeed_sdmc.c
auxbus.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
bcm2835_mbox.c
bcm2835_property.c
bcm2835_rng.c
cbus.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
debugexit.c
eccmemctl.c
edu.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
exynos4210_clk.c
exynos4210_pmu.c
exynos4210_rng.c
hyperv_testdev.c
imx6_ccm.c Remove empty statements 2017-12-18 17:07:02 +03:00
imx6_src.c
imx25_ccm.c
imx31_ccm.c
imx_ccm.c
ivshmem.c ivshmem: Always remove irqfd notifiers 2018-02-07 14:09:24 +01:00
Makefile.objs i386/pc: move vmport.c to hw/i386/ 2017-12-18 17:07:02 +03:00
max111x.c
milkymist-hpdmc.c
milkymist-pfpu.c
mips_cmgcr.c
mips_cpc.c
mips_itu.c
mmio_interface.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
mps2-scc.c
msf2-sysreg.c
mst_fpga.c
omap_clk.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
omap_gpmc.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
omap_l4.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
omap_sdrc.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
omap_tap.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
pc-testdev.c
pci-testdev.c pci: Add INTERFACE_CONVENTIONAL_PCI_DEVICE to Conventional PCI devices 2017-10-15 05:54:43 +03:00
puv3_pm.c
pvpanic.c hw/misc/pvpanic: extract public API from i386/pc to "hw/misc/pvpanic.h" 2017-12-18 17:07:02 +03:00
sga.c misc: remove old i386 dependency 2017-12-18 17:07:02 +03:00
slavio_misc.c
stm32f2xx_syscfg.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
tmp105.c Replace all occurances of __FUNCTION__ with __func__ 2018-01-22 09:46:18 +01:00
tmp105.h
tmp421.c
trace-events
unimp.c
vmcoreinfo.c dump-guest-memory.py: fix "You can't do that without a process to debug" 2018-01-02 14:49:54 +01:00
zynq_slcr.c maint: Fix macros with broken 'do/while(0); ' usage 2018-01-16 14:54:52 +01:00
zynq-xadc.c