aboutsummaryrefslogtreecommitdiff
path: root/accel/tcg/tcg-accel-ops-icount.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel/tcg/tcg-accel-ops-icount.c')
-rw-r--r--accel/tcg/tcg-accel-ops-icount.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/accel/tcg/tcg-accel-ops-icount.c b/accel/tcg/tcg-accel-ops-icount.c
index 87762b4..13b8fbe 100644
--- a/accel/tcg/tcg-accel-ops-icount.c
+++ b/accel/tcg/tcg-accel-ops-icount.c
@@ -81,7 +81,13 @@ void icount_handle_deadline(void)
int64_t deadline = qemu_clock_deadline_ns_all(QEMU_CLOCK_VIRTUAL,
QEMU_TIMER_ATTR_ALL);
- if (deadline == 0) {
+ /*
+ * Instructions, interrupts, and exceptions are processed in cpu-exec.
+ * Don't interrupt cpu thread, when these events are waiting
+ * (i.e., there is no checkpoint)
+ */
+ if (deadline == 0
+ && (replay_mode != REPLAY_MODE_PLAY || replay_has_checkpoint())) {
icount_notify_aio_contexts();
}
}