qemu-patch-raspberry4/hw
Paolo Bonzini 83d768b564 virtio: set ISR on dataplane notifications
Dataplane has been omitting forever the step of setting ISR when
an interrupt is raised.  This caused little breakage, because the
specification actually says that ISR may not be updated in MSI mode.

Some versions of the Windows drivers however didn't clear MSI mode
correctly, and proceeded using polling mode (using ISR, not the used
ring index!) for crashdump and hibernation.  If it were just crashdump
and hibernation it would not be a big deal, but recent releases of
Windows do not really shut down, but rather log out and hibernate to
make the next startup faster.  Hence, this manifested as a more serious
hang during shutdown with e.g. Windows 8.1 and virtio-win 1.8.0 RPMs.
Newer versions fixed this, while older versions do not use MSI at all.

The failure has always been there for virtio dataplane, but it became
visible after commits 9ffe337 ("virtio-blk: always use dataplane path
if ioeventfd is active", 2016-10-30) and ad07cd6 ("virtio-scsi: always
use dataplane path if ioeventfd is active", 2016-10-30) made virtio-blk
and virtio-scsi always use the dataplane code under KVM.  The good news
therefore is that it was not a bug in the patches---they were doing
exactly what they were meant for, i.e. shake out remaining dataplane bugs.

The fix is not hard, so it's worth arranging for the broken drivers.
The virtio_should_notify+event_notifier_set pair that is common to
virtio-blk and virtio-scsi dataplane is replaced with a new public
function virtio_notify_irqfd that also sets ISR.  The irqfd emulation
code now need not set ISR anymore, so virtio_irq is removed.

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-11-18 17:29:25 +02:00
..
9pfs 9pfs: drop excessive error message from virtfs_reset() 2016-11-01 12:03:03 +01:00
acpi nvdimm acpi: introduce NVDIMM_DSM_MEMORY_SIZE 2016-11-15 17:20:37 +02:00
adc STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00
alpha sun4uv: fix serial initialization regression 2016-10-24 15:27:20 +02:00
arm hw/arm/tosa: Fix reset handling 2016-10-28 15:51:27 +01:00
audio audio: intel-hda: check stream entry count during transfer 2016-10-26 14:51:44 +02:00
block virtio: set ISR on dataplane notifications 2016-11-18 17:29:25 +02:00
bt char: replace avail_connections 2016-10-24 15:46:10 +02:00
char char: cadence: check baud rate generator and divider values 2016-11-07 10:00:24 +00:00
core qdev: hotplug: drop HotplugHandler.post_plug callback 2016-11-15 17:20:37 +02:00
cpu cpu: Abstract CPU core type 2016-06-17 16:33:48 +10:00
cris cris: Fix broken header guard in hw/cris/boot.h 2016-07-12 16:20:46 +02:00
display Xen 2016/10/28 2016-10-31 12:35:39 +00:00
dma hw/dma/pl080: Fix bad bit mask (PL080_CONF_M1 | PL080_CONF_M1) 2016-10-17 19:22:17 +01:00
gpio i.MX: Fix GPIO ISR register write 2016-10-28 15:51:27 +01:00
i2c hw/i2c/bitbang_i2c: Handle NACKs from devices 2016-11-07 10:01:15 +00:00
i386 nvdimm acpi: rename nvdimm_acpi_hotplug 2016-11-15 17:20:37 +02:00
ide macio: switch over to new byte-aligned DMA helpers 2016-10-27 16:29:13 -04:00
input hw/input/hid: support alternative sysrq/break scancodes for gtk-vnc 2016-11-10 15:29:58 +00:00
intc nvic: set pending status for not active interrupts 2016-11-07 10:00:24 +00:00
ipack ipack: Update e-mail address 2016-05-18 15:04:27 +03:00
ipmi ipmi: Add graceful shutdown handling to the external BMC 2016-11-01 19:21:09 +02:00
isa char: remove init callback 2016-10-24 15:27:20 +02:00
lm32 Clean up decorations and whitespace around header guards 2016-07-12 16:20:46 +02:00
m68k m68k: change default system clock for m5208evb 2016-10-08 11:25:29 +03:00
mem pc: memhp: enable nvdimm device hotplug 2016-11-01 19:21:09 +02:00
microblaze clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
mips clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
misc milkymist-pfpu: fix potential integer overflow 2016-10-28 18:17:23 +03:00
moxie hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
net virtio-net: mark VIRTIO_NET_F_GSO as legacy 2016-11-15 17:20:37 +02:00
nvram trivial patches for 2016-10-28 2016-10-31 11:58:30 +00:00
openrisc hw: explicitly include qemu-common.h and cpu.h 2016-03-22 22:20:17 +01:00
pci trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
pci-bridge clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
pci-host apb: convert init to realize 2016-07-29 00:07:09 +03:00
pcmcia hw: Clean up includes 2016-01-29 15:07:25 +00:00
ppc Base patches for MTTCG enablement. 2016-10-31 15:29:12 +00:00
s390x virtio: allow per-device-class legacy features 2016-11-15 17:20:36 +02:00
scsi virtio: set ISR on dataplane notifications 2016-11-18 17:29:25 +02:00
sd vmstateify ssi-sd 2016-09-22 18:13:08 +01:00
sh4 sh4: fix broken link to documentation 2016-09-15 15:32:22 +03:00
smbios smbios: fix uuid copy 2016-09-29 11:43:22 +08:00
sparc nvram: Rename openbios_firmware_abi.h into sun_nvram.h 2016-10-28 09:36:58 +11:00
sparc64 nvram: Rename openbios_firmware_abi.h into sun_nvram.h 2016-10-28 09:36:58 +11:00
ssi xilinx: fix buffer overflow on realize 2016-10-24 15:27:20 +02:00
timer clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
tpm clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
tricore tricore: remove useless cast 2016-09-15 15:32:22 +03:00
unicore32 clean-up: removed duplicate #includes 2016-10-28 18:17:24 +03:00
usb usbredir: free vm_change_state_handler in usbredir destroy dispatch 2016-11-10 15:29:58 +00:00
vfio vfio: Add support for mmapping sub-page MMIO BARs 2016-10-31 09:53:04 -06:00
virtio virtio: set ISR on dataplane notifications 2016-11-18 17:29:25 +02:00
watchdog nmi: remove x86 specific nmi handling 2016-05-23 16:53:46 +02:00
xen hw/xen/xen_pvdev: Include qemu/log.h for qemu_log_vprintf() 2016-11-02 12:26:04 -07:00
xenpv xenpv: Fix qemu_uuid compiling error 2016-09-29 11:43:17 +08:00
xtensa char: remove init callback 2016-10-24 15:27:20 +02:00
Makefile.objs STM32F2xx: Add the ADC device 2016-10-04 13:28:07 +01:00