qemu/system
Stefan Hajnoczi e661a24703 dma-helpers: don't lock AioContext in dma_blk_cb()
Commit abfcd2760b ("dma-helpers: prevent dma_blk_cb() vs
dma_aio_cancel() race") acquired the AioContext lock inside dma_blk_cb()
to avoid a race with scsi_device_purge_requests() running in the main
loop thread.

The SCSI code no longer calls dma_aio_cancel() from the main loop thread
while I/O is running in the IOThread AioContext. Therefore it is no
longer necessary to take this lock to protect DMAAIOCB fields. The
->cb() function also does not require the lock because blk_aio_*() and
friends do not need the AioContext lock.

Both hw/ide/core.c and hw/ide/macio.c also call dma_blk_io() but don't
rely on it taking the AioContext lock, so this change is safe.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20231204164259.1515217-5-stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-12-21 22:49:27 +01:00
..
arch_init.c
async-teardown.c
balloon.c balloon: Fix a misleading error message 2023-11-17 10:07:52 +01:00
bootdevice.c
cpu-throttle.c
cpu-timers.c
cpus.c system/cpus: Fix CPUState.nr_cores' calculation 2023-11-07 13:08:48 +01:00
datadir.c
device_tree.c
dirtylimit.c system/dirtylimit: Drop the reduplicative check 2023-11-03 07:48:25 +01:00
dma-helpers.c dma-helpers: don't lock AioContext in dma_blk_cb() 2023-12-21 22:49:27 +01:00
globals.c
ioport.c
main.c softmmu: pass the main loop status to gdb "Wxx" packet 2023-10-12 12:33:24 +10:00
memory_mapping.c memory: follow Error API guidelines 2023-10-19 23:13:27 +02:00
memory.c system/memory: use ldn_he_p/stn_he_p 2023-12-04 16:21:00 +01:00
meson.build
physmem.c coverity: physmem: use simple assertions instead of modelling 2023-11-24 12:07:47 +01:00
qdev-monitor.c Add virtio-sound-pci device 2023-11-07 03:39:10 -05:00
qemu-seccomp.c
qtest.c system/qtest: Include missing 'hw/core/cpu.h' header 2023-12-20 10:29:23 +01:00
rtc.c
runstate-action.c
runstate-hmp-cmds.c
runstate.c softmmu: pass the main loop status to gdb "Wxx" packet 2023-10-12 12:33:24 +10:00
tpm-hmp-cmds.c
tpm.c
trace-events
trace.h
vl.c vl: Improve error message for conflicting -incoming and -loadvm 2023-12-21 22:49:27 +01:00
watchpoint.c accel/tcg: Remove CF_LAST_IO 2023-11-14 10:40:54 -08:00