diff options
author | Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru> | 2020-10-03 20:13:37 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-10-06 08:34:49 +0200 |
commit | f9a9fb6516b453d2318eca0fc5eecc4c57f6b065 (patch) | |
tree | 76a9663ec8e2e60c37898a9f244099d15f59d63e /include/sysemu/replay.h | |
parent | f6baed3d1485817e812ac8b275b5b4158384c59e (diff) |
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 'include/sysemu/replay.h')
-rw-r--r-- | include/sysemu/replay.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index d6026ed8e5..c486c3afb2 100644 --- a/include/sysemu/replay.h +++ b/include/sysemu/replay.h @@ -149,6 +149,8 @@ void replay_disable_events(void); void replay_enable_events(void); /*! Returns true when saving events is enabled */ bool replay_events_enabled(void); +/* Flushes events queue */ +void replay_flush_events(void); /*! Adds bottom half event to the queue */ void replay_bh_schedule_event(QEMUBH *bh); /* Adds oneshot bottom half event to the queue */ |