diff options
author | 2024-01-19 08:57:46 -0500 | |
---|---|---|
committer | 2024-01-26 11:16:58 +0100 | |
commit | 71ee0cdd14cc01a8b51aa4e9577dd0a1bb2f8e19 (patch) | |
tree | 2a27b4df1f2b3ed1ed2d52ec46f106ec498e523e /scripts/qapi/source.py | |
parent | virtio-blk: rename dataplane to ioeventfd (diff) | |
download | qemu-71ee0cdd14cc01a8b51aa4e9577dd0a1bb2f8e19.tar.xz qemu-71ee0cdd14cc01a8b51aa4e9577dd0a1bb2f8e19.zip |
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>
Diffstat (limited to 'scripts/qapi/source.py')
0 files changed, 0 insertions, 0 deletions