]> git.proxmox.com Git - mirror_qemu.git/commit - util/async.c
async: Add an optional reentrancy guard to the BH API
authorAlexander Bulekov <alxndr@bu.edu>
Thu, 27 Apr 2023 21:10:07 +0000 (17:10 -0400)
committerThomas Huth <thuth@redhat.com>
Fri, 28 Apr 2023 09:31:07 +0000 (11:31 +0200)
commit9c86c97f12c060bf7484dd931f38634e166a81f0
treeb3e82f9abe80c39166b4880f0405b0785ba731a5
parenta2e1753b8054344f32cf94f31c6399a58794a380
async: Add an optional reentrancy guard to the BH API

Devices can pass their MemoryReentrancyGuard (from their DeviceState),
when creating new BHes. Then, the async API will toggle the guard
before/after calling the BH call-back. This prevents bh->mmio reentrancy
issues.

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Message-Id: <20230427211013.2994127-3-alxndr@bu.edu>
[thuth: Fix "line over 90 characters" checkpatch.pl error]
Signed-off-by: Thomas Huth <thuth@redhat.com>
docs/devel/multiple-iothreads.txt
include/block/aio.h
include/qemu/main-loop.h
tests/unit/ptimer-test-stubs.c
util/async.c
util/main-loop.c
util/trace-events