qemu-patch-raspberry4/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 hw/9pfs/9p-synth: added directory for readdir test 2020-02-08 09:29:04 +01:00
acpi mem: move nvdimm_device_list to utilities 2020-02-21 09:15:03 +11:00
adc hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
alpha alpha/dp264: use memdev for RAM 2020-02-19 16:49:54 +00:00
arm Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD 2020-02-25 13:41:48 +01:00
audio add device_legacy_reset function to prepare for reset api change 2020-01-30 16:02:03 +00:00
block xen-bus/block: explicitly assign event channels to an AioContext 2020-02-27 11:50:30 +00:00
char hw/char/exynos4210_uart: Fix memleaks in exynos4210_uart_init 2020-02-13 14:14:55 +00:00
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 qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
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 hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
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 add device_legacy_reset function to prepare for reset api change 2020-01-30 16:02:03 +00:00
i2c aspeed/i2c: Prevent uninitialized warning 2020-02-06 11:13:24 +01:00
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 hw/input: Do not enable CONFIG_PCKBD by default 2020-02-04 09:01:31 +01:00
intc target/arm: Test correct register in aa32_pan and aa32_ats1e1 checks 2020-02-21 16:07:02 +00:00
ipack qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
ipmi qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
isa hw/input: Do not enable CONFIG_PCKBD by default 2020-02-04 09:01:31 +01:00
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 hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
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 hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
net Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD 2020-02-25 13:41:48 +01:00
nios2 hw/nios2:fix leak of fdevice tree blob 2020-02-19 10:32:50 +01:00
nubus hw/m68k: add Nubus support 2019-10-28 19:06:47 +01:00
nvram Let cpu_[physical]_memory() calls pass a boolean 'is_write' argument 2020-02-20 14:47:08 +01:00
openrisc hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
pci qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
pci-bridge qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
pci-host pnv/phb3: Add missing break statement 2020-02-21 09:15:04 +11:00
pcmcia hw/*/Makefile.objs: Move many .o files to common-objs 2020-02-04 09:00:57 +01:00
ppc Merge branch 'exec_rw_const_v4' of https://github.com/philmd/qemu into HEAD 2020-02-25 13:41:48 +01:00
rdma qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
riscv riscv: virt: Use Goldfish RTC device 2020-02-10 12:01:38 -08:00
rtc hw: rtc: Add Goldfish RTC device 2020-02-10 12:01:37 -08:00
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 semihosting: add qemu_semihosting_console_inc for SYS_READC 2020-01-09 11:41:29 +00:00
sh4 sh4: Fix PCI ISA IO memory subregion 2020-02-21 16:07:02 +00:00
smbios hw/smbios/smbios: Remove unused include 2020-02-06 10:38:57 +01:00
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 stm32f2xx_timer: delay timer_new to avoid memleaks 2020-02-07 14:04:28 +00:00
tpm hw/ppc/Kconfig: Enable TPM_SPAPR as part of PSERIES config 2020-02-02 14:07:57 +11:00
tricore hw/core/loader: Let load_elf() populate a field with CPU-specific flags 2020-01-29 19:28:52 +01:00
unicore32 Include hw/irq.h a lot less 2019-08-16 13:31:52 +02:00
usb hcd-ehci: Introduce "companion-enable" sysbus property 2020-02-21 16:07:02 +00:00
vfio hw/vfio/display: Remove superfluous semicolon 2020-02-18 20:20:49 +01:00
virtio hw/virtio: Let vhost_memory_map() use a boolean 'is_write' argument 2020-02-20 14:47:08 +01:00
watchdog qdev: set properties with device_class_set_props() 2020-01-24 20:59:15 +01:00
xen xen-bus/block: explicitly assign event channels to an AioContext 2020-02-27 11:50:30 +00:00
xenpv trivial: Remove xenfb_enabled from sysemu.h 2020-02-04 09:00:57 +01:00
xtensa hw/xtensa/xtfpga:fix leak of fdevice tree blob 2020-02-19 10:33:38 +01:00
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