This allows us to differentiate between a fresh boot and a restore boot. Signed-off-by: Joelle van Dyne <j...@getutm.app> --- softmmu/runstate.c | 1 + softmmu/vl.c | 3 +++ 2 files changed, 4 insertions(+)
diff --git a/softmmu/runstate.c b/softmmu/runstate.c index 1e68680b9d..fa3dd3a4ab 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -76,6 +76,7 @@ typedef struct { static const RunStateTransition runstate_transitions_def[] = { { RUN_STATE_PRELAUNCH, RUN_STATE_INMIGRATE }, + { RUN_STATE_PRELAUNCH, RUN_STATE_RESTORE_VM }, { RUN_STATE_DEBUG, RUN_STATE_RUNNING }, { RUN_STATE_DEBUG, RUN_STATE_FINISH_MIGRATE }, diff --git a/softmmu/vl.c b/softmmu/vl.c index 706bd7cff7..29586d94ff 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -3131,6 +3131,9 @@ void qemu_init(int argc, char **argv, char **envp) add_device_config(DEV_DEBUGCON, optarg); break; case QEMU_OPTION_loadvm: + if (!loadvm) { + runstate_set(RUN_STATE_RESTORE_VM); + } loadvm = optarg; break; case QEMU_OPTION_full_screen: -- 2.28.0