aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorAlexander Bulekov <alxndr@bu.edu>2023-04-27 17:10:07 -0400
committerThomas Huth <thuth@redhat.com>2023-04-28 11:31:07 +0200
commit9c86c97f12c060bf7484dd931f38634e166a81f0 (patch)
treeb3e82f9abe80c39166b4880f0405b0785ba731a5 /tests/unit
parenta2e1753b8054344f32cf94f31c6399a58794a380 (diff)
downloadqemu-9c86c97f12c060bf7484dd931f38634e166a81f0.zip
qemu-9c86c97f12c060bf7484dd931f38634e166a81f0.tar.gz
qemu-9c86c97f12c060bf7484dd931f38634e166a81f0.tar.bz2
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>
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/ptimer-test-stubs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/ptimer-test-stubs.c b/tests/unit/ptimer-test-stubs.c
index f2bfced..8c9407c 100644
--- a/tests/unit/ptimer-test-stubs.c
+++ b/tests/unit/ptimer-test-stubs.c
@@ -107,7 +107,8 @@ int64_t qemu_clock_deadline_ns_all(QEMUClockType type, int attr_mask)
return deadline;
}
-QEMUBH *qemu_bh_new_full(QEMUBHFunc *cb, void *opaque, const char *name)
+QEMUBH *qemu_bh_new_full(QEMUBHFunc *cb, void *opaque, const char *name,
+ MemReentrancyGuard *reentrancy_guard)
{
QEMUBH *bh = g_new(QEMUBH, 1);