qemu-e2k/hw
Paul Durrant 32d0b7be68 xen-bus/block: explicitly assign event channels to an AioContext
It is not safe to close an event channel from the QEMU main thread when
that channel's poller is running in IOThread context.

This patch adds a new xen_device_set_event_channel_context() function
to explicitly assign the channel AioContext, and modifies
xen_device_bind_event_channel() to initially assign the channel's poller
to the QEMU main thread context. The code in xen-block's dataplane is
then modified to assign the channel to IOThread context during
xen_block_dataplane_start() and de-assign it during in
xen_block_dataplane_stop(), such that the channel is always assigned
back to main thread context before it is closed. aio_set_fd_handler()
already deals with all the necessary synchronization when moving an fd
between AioContext-s so no extra code is needed to manage this.

Reported-by: Julien Grall <jgrall@amazon.com>
Signed-off-by: Paul Durrant <pdurrant@amazon.com>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
Message-Id: <20191216143451.19024-1-pdurrant@amazon.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
2020-02-27 11:50:30 +00:00
..
9pfs
acpi mem: move nvdimm_device_list to utilities 2020-02-21 09:15:03 +11:00
adc
alpha
arm Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD 2020-02-25 13:41:48 +01:00
audio
block xen-bus/block: explicitly assign event channels to an AioContext 2020-02-27 11:50:30 +00:00
char
core Merge tag 'patchew/20200219160953.13771-1-imammedo@redhat.com' of https://github.com/patchew-project/qemu into HEAD 2020-02-25 09:19:00 +01:00
cpu
cris cris/axis_dev88: use memdev for RAM 2020-02-19 16:49:57 +00:00
display Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD 2020-02-25 13:41:48 +01:00
dma Avoid address_space_rw() with a constant is_write argument 2020-02-20 14:47:08 +01:00
gpio
hppa Merge tag 'patchew/20200219160953.13771-1-imammedo@redhat.com' of https://github.com/patchew-project/qemu into HEAD 2020-02-25 09:19:00 +01:00
hyperv
i2c
i386 x86/pc: use memdev for RAM 2020-02-19 16:49:58 +00:00
ide hw/ide: Let the DMAIntFunc prototype use a boolean 'is_write' argument 2020-02-20 14:47:08 +01:00
input
intc target/arm: Test correct register in aa32_pan and aa32_ats1e1 checks 2020-02-21 16:07:02 +00:00
ipack
ipmi
isa
lm32 lm32/milkymist: use memdev for RAM 2020-02-19 16:49:58 +00:00
m68k Merge tag 'patchew/20200219160953.13771-1-imammedo@redhat.com' of https://github.com/patchew-project/qemu into HEAD 2020-02-25 09:19:00 +01:00
mem spapr: Add NVDIMM device support 2020-02-21 09:15:04 +11:00
microblaze
mips mips/mips_r4k: use memdev for RAM 2020-02-19 16:49:59 +00:00
misc Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD 2020-02-25 13:41:48 +01:00
moxie
net Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD 2020-02-25 13:41:48 +01:00
nios2
nubus
nvram Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument 2020-02-20 14:47:08 +01:00
openrisc
pci
pci-bridge
pci-host pnv/phb3: Add missing break statement 2020-02-21 09:15:04 +11:00
pcmcia
ppc Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD 2020-02-25 13:41:48 +01:00
rdma
riscv
rtc
s390x Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD 2020-02-25 13:41:48 +01:00
scsi Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD 2020-02-25 13:41:48 +01:00
sd hw: Remove unnecessary cast when calling dma_memory_read() 2020-02-20 14:47:08 +01:00
semihosting
sh4 sh4: Fix PCI ISA IO memory subregion 2020-02-21 16:07:02 +00:00
smbios
sparc sparc/sun4m: use memdev for RAM 2020-02-19 16:50:01 +00:00
sparc64 sparc/niagara: use memdev for RAM 2020-02-19 16:50:01 +00:00
ssi xilinx_spips: Correct the number of dummy cycles for the FAST_READ_4 cmd 2020-02-21 16:07:02 +00:00
timer
tpm
tricore
unicore32
usb hcd-ehci: Introduce "companion-enable" sysbus property 2020-02-21 16:07:02 +00:00
vfio
virtio hw/virtio: Let vhost_memory_map() use a boolean 'is_write' argument 2020-02-20 14:47:08 +01:00
watchdog
xen xen-bus/block: explicitly assign event channels to an AioContext 2020-02-27 11:50:30 +00:00
xenpv
xtensa
Kconfig
Makefile.objs