aboutsummaryrefslogtreecommitdiff
path: root/softmmu/vl.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-10-27 04:44:18 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-12-15 12:51:48 -0500
commit164dafd1744c69d268b89015977e19d8a9617fdf (patch)
tree7c3f6a9c5dfb766bdd25cfa87f37201095cd674f /softmmu/vl.c
parent69e92bd558d71fdbd0c1989391b20edcc700daa9 (diff)
remove preconfig state
The preconfig state is only used if -incoming is not specified, which makes the RunState state machine more tricky than it need be. However there is already an equivalent condition which works even with -incoming, namely qdev_hotplug. Use it instead of a separate runstate. Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'softmmu/vl.c')
-rw-r--r--softmmu/vl.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 7146fbe219..ab2210bc79 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -557,7 +557,7 @@ static int default_driver_check(void *opaque, QemuOpts *opts, Error **errp)
/***********************************************************/
/* QEMU state */
-static RunState current_run_state = RUN_STATE_PRECONFIG;
+static RunState current_run_state = RUN_STATE_PRELAUNCH;
/* We use RUN_STATE__MAX but any invalid value will do */
static RunState vmstop_requested = RUN_STATE__MAX;
@@ -569,13 +569,7 @@ typedef struct {
} RunStateTransition;
static const RunStateTransition runstate_transitions_def[] = {
- /* from -> to */
- { RUN_STATE_PRECONFIG, RUN_STATE_PRELAUNCH },
- /* Early switch to inmigrate state to allow -incoming CLI option work
- * as it used to. TODO: delay actual switching to inmigrate state to
- * the point after machine is built and remove this hack.
- */
- { RUN_STATE_PRECONFIG, RUN_STATE_INMIGRATE },
+ { RUN_STATE_PRELAUNCH, RUN_STATE_INMIGRATE },
{ RUN_STATE_DEBUG, RUN_STATE_RUNNING },
{ RUN_STATE_DEBUG, RUN_STATE_FINISH_MIGRATE },
@@ -1471,9 +1465,6 @@ static bool main_loop_should_exit(void)
ShutdownCause request;
if (preconfig_exit_requested) {
- if (runstate_check(RUN_STATE_PRECONFIG)) {
- runstate_set(RUN_STATE_PRELAUNCH);
- }
preconfig_exit_requested = false;
return true;
}