qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH v3 30/30] replay: don't process async events whe


From: Pavel Dovgalyuk
Subject: [Qemu-devel] [RFC PATCH v3 30/30] replay: don't process async events when warping the clock
Date: Thu, 11 Jan 2018 11:27:44 +0300
User-agent: StGit/0.17.1-dirty

Virtual clock is wapred from iothread and vcpu thread. When the hardware
events associated with warp checkpoint, then interrupt delivering may be
non-deterministic if checkpoint is processed in different threads in record
and replay.
This patch disables event processing for clock warp checkpoint and leaves
all hardware events to other checkpoints (e.g., virtual clock).

Signed-off-by: Pavel Dovgalyuk <address@hidden>
---
 replay/replay.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/replay/replay.c b/replay/replay.c
index b9c496a..cc43c38 100644
--- a/replay/replay.c
+++ b/replay/replay.c
@@ -211,7 +211,12 @@ bool replay_checkpoint(ReplayCheckpoint checkpoint)
     } else if (replay_mode == REPLAY_MODE_RECORD) {
         g_assert(replay_mutex_locked());
         replay_put_event(EVENT_CHECKPOINT + checkpoint);
-        replay_save_events(checkpoint);
+        /* This checkpoint belongs to several threads.
+           Processing events from different threads is
+           non-deterministic */
+        if (checkpoint != CHECKPOINT_CLOCK_WARP_START) {
+            replay_save_events(checkpoint);
+        }
         res = true;
     }
 out:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]