diff options
author | Pavel Dovgalyuk | 2020-10-03 19:13:37 +0200 |
---|---|---|
committer | Paolo Bonzini | 2020-10-06 08:34:49 +0200 |
commit | f9a9fb6516b453d2318eca0fc5eecc4c57f6b065 (patch) | |
tree | 76a9663ec8e2e60c37898a9f244099d15f59d63e /replay | |
parent | replay: implement replay-seek command (diff) | |
download | qemu-f9a9fb6516b453d2318eca0fc5eecc4c57f6b065.tar.gz qemu-f9a9fb6516b453d2318eca0fc5eecc4c57f6b065.tar.xz qemu-f9a9fb6516b453d2318eca0fc5eecc4c57f6b065.zip |
replay: flush rr queue before loading the vmstate
Non-empty record/replay queue prevents saving and loading the VM state,
because it includes pending bottom halves and block coroutines.
But when the new VM state is loaded, we don't have to preserve the consistency
of the current state anymore. Therefore this patch just flushes the queue
allowing the coroutines to finish and removes checking for empty rr queue
for load_snapshot function.
Signed-off-by: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <160174521762.12451.15752448887893855757.stgit@pasha-ThinkPad-X280>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'replay')
-rw-r--r-- | replay/replay-events.c | 4 | ||||
-rw-r--r-- | replay/replay-internal.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/replay/replay-events.c b/replay/replay-events.c index 302b84043a..a1c6bb934e 100644 --- a/replay/replay-events.c +++ b/replay/replay-events.c @@ -77,6 +77,10 @@ bool replay_has_events(void) void replay_flush_events(void) { + if (replay_mode == REPLAY_MODE_NONE) { + return; + } + g_assert(replay_mutex_locked()); while (!QTAILQ_EMPTY(&events_list)) { diff --git a/replay/replay-internal.h b/replay/replay-internal.h index 2f6145ec7c..97649ed8d7 100644 --- a/replay/replay-internal.h +++ b/replay/replay-internal.h @@ -149,8 +149,6 @@ void replay_read_next_clock(unsigned int kind); void replay_init_events(void); /*! Clears internal data structures for events handling */ void replay_finish_events(void); -/*! Flushes events queue */ -void replay_flush_events(void); /*! Returns true if there are any unsaved events in the queue */ bool replay_has_events(void); /*! Saves events from queue into the file */ |