diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2024-01-19 08:57:46 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2024-01-26 11:16:58 +0100 |
commit | 71ee0cdd14cc01a8b51aa4e9577dd0a1bb2f8e19 (patch) | |
tree | 2a27b4df1f2b3ed1ed2d52ec46f106ec498e523e /linux-user/exit.c | |
parent | 3cdaf3dd4a4ca94ebabe7eab23b432f1a6c547cc (diff) | |
download | qemu-71ee0cdd14cc01a8b51aa4e9577dd0a1bb2f8e19.zip qemu-71ee0cdd14cc01a8b51aa4e9577dd0a1bb2f8e19.tar.gz qemu-71ee0cdd14cc01a8b51aa4e9577dd0a1bb2f8e19.tar.bz2 |
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 'linux-user/exit.c')
0 files changed, 0 insertions, 0 deletions