aboutsummaryrefslogtreecommitdiff
path: root/replay/replay.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>2018-02-27 12:53:16 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2018-03-12 17:10:38 +0100
commit89e46eb477113550485bc24264d249de9fd1260a (patch)
tree854a4701002c4171b2ee900a4854a9dbfcd3f7af /replay/replay.c
parent821c113033075d4f1b50966d92022a1064085422 (diff)
replay: don't process async events when warping the clock
Virtual clock is warped 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 <pavel.dovgaluk@ispras.ru> Message-Id: <20180227095316.1060.4134.stgit@pasha-VirtualBox> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>
Diffstat (limited to 'replay/replay.c')
-rw-r--r--replay/replay.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/replay/replay.c b/replay/replay.c
index eae8daf18a..8228261401 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: