aboutsummaryrefslogtreecommitdiff
path: root/stubs
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2019-09-17 14:58:19 +0300
committerKevin Wolf <kwolf@redhat.com>2019-10-14 17:12:48 +0200
commite4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc (patch)
treefb5bb4af2ee8c376cb3a237c46604a283514e208 /stubs
parentae25dccb7df64ec9cbb52d7a0a67308d74372cfd (diff)
downloadqemu-e4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc.zip
qemu-e4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc.tar.gz
qemu-e4ec5ad464e48ab8d978b4dd8aacd05c1c4a87cc.tar.bz2
replay: add BH oneshot event for block layer
Replay is capable of recording normal BH events, but sometimes there are single use callbacks scheduled with aio_bh_schedule_oneshot function. This patch enables recording and replaying such callbacks. Block layer uses these events for calling the completion function. Replaying these calls makes the execution deterministic. Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'stubs')
-rw-r--r--stubs/Makefile.objs1
-rw-r--r--stubs/replay-user.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index 9c7393b..4a50e95 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -20,6 +20,7 @@ stub-obj-y += monitor.o
stub-obj-y += notify-event.o
stub-obj-y += qtest.o
stub-obj-y += replay.o
+stub-obj-y += replay-user.o
stub-obj-y += runstate-check.o
stub-obj-y += set-fd-handler.o
stub-obj-y += sysbus.o
diff --git a/stubs/replay-user.c b/stubs/replay-user.c
new file mode 100644
index 0000000..2ad9e27
--- /dev/null
+++ b/stubs/replay-user.c
@@ -0,0 +1,9 @@
+#include "qemu/osdep.h"
+#include "sysemu/replay.h"
+#include "sysemu/sysemu.h"
+
+void replay_bh_schedule_oneshot_event(AioContext *ctx,
+ QEMUBHFunc *cb, void *opaque)
+{
+ aio_bh_schedule_oneshot(ctx, cb, opaque);
+}