aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorPavel Dovgalyuk <pavel.dovgaluk@ispras.ru>2017-01-24 10:17:47 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2017-01-27 18:07:30 +0100
commit9c2037d0a41d3d55b17a68e42e815be45036d8d2 (patch)
treef67f146cccc9f0c6f1a6ad271f770188238875eb /vl.c
parentac8c19ba742fcbc3d64a5390b32acc6479edd7e1 (diff)
replay: save/load initial state
This patch implements initial vmstate creation or loading at the start of record/replay. It is needed for rewinding the execution in the replay mode. v4 changes: - snapshots are not created by default anymore v3 changes: - added rrsnapshot option Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru> Message-Id: <20170124071746.4572.61449.stgit@PASHA-ISP> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 68e8c003d1..9b71ed586a 100644
--- a/vl.c
+++ b/vl.c
@@ -465,6 +465,9 @@ static QemuOptsList qemu_icount_opts = {
}, {
.name = "rrfile",
.type = QEMU_OPT_STRING,
+ }, {
+ .name = "rrsnapshot",
+ .type = QEMU_OPT_STRING,
},
{ /* end of list */ }
},
@@ -4634,7 +4637,9 @@ int main(int argc, char **argv, char **envp)
replay_checkpoint(CHECKPOINT_RESET);
qemu_system_reset(VMRESET_SILENT);
register_global_state();
- if (loadvm) {
+ if (replay_mode != REPLAY_MODE_NONE) {
+ replay_vmstate_init();
+ } else if (loadvm) {
if (load_vmstate(loadvm) < 0) {
autostart = 0;
}