qemu-e2k/hw/block
Stefan Hajnoczi 71ee0cdd14 virtio-blk: restart s->rq reqs in vq AioContexts
A virtio-blk device with the iothread-vq-mapping parameter has
per-virtqueue AioContexts. It is not thread-safe to process s->rq
requests in the BlockBackend AioContext since that may be different from
the virtqueue's AioContext to which this request belongs. The code
currently races and could crash.

Adapt virtio_blk_dma_restart_cb() to first split s->rq into per-vq lists
and then schedule a BH each vq's AioContext as necessary. This way
requests are safely processed in their vq's AioContext.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-ID: <20240119135748.270944-5-stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2024-01-26 11:16:58 +01:00
..
dataplane virtio-blk: move dataplane code into virtio-blk.c 2024-01-26 11:16:58 +01:00
block.c
cdrom.c
ecc.c hw/block: Constify VMState 2023-12-29 11:17:30 +11:00
fdc-internal.h
fdc-isa.c hw/block: Constify VMState 2023-12-29 11:17:30 +11:00
fdc-sysbus.c hw/block: Constify VMState 2023-12-29 11:17:30 +11:00
fdc.c hw/block: Constify VMState 2023-12-29 11:17:30 +11:00
hd-geometry.c hw/other: spelling fixes 2023-09-21 11:31:16 +03:00
Kconfig
m25p80_sfdp.c
m25p80_sfdp.h
m25p80.c hw/block: Constify VMState 2023-12-29 11:17:30 +11:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
nand.c hw/block: Constify VMState 2023-12-29 11:17:30 +11:00
onenand.c hw/block: Constify VMState 2023-12-29 11:17:30 +11:00
pflash_cfi01.c hw/pflash: implement update buffer for block writes 2024-01-19 12:28:59 +01:00
pflash_cfi02.c hw/pflash: implement update buffer for block writes 2024-01-19 12:28:59 +01:00
swim.c hw/block: Constify VMState 2023-12-29 11:17:30 +11:00
tc58128.c hw/block: Deprecate the TC58128 block device 2024-01-19 12:28:59 +01:00
trace-events hw/pflash: implement update buffer for block writes 2024-01-19 12:28:59 +01:00
trace.h
vhost-user-blk.c hw/block: Constify VMState 2023-12-29 11:17:30 +11:00
virtio-blk-common.c
virtio-blk.c virtio-blk: restart s->rq reqs in vq AioContexts 2024-01-26 11:16:58 +01:00
xen_blkif.h
xen-block.c hw/xen: clean up xen_block_find_free_vdev() to avoid Coverity false positive 2023-11-21 11:45:06 +00:00