machine: introduce MachineInitPhase

Generalize the qdev_hotplug variable to the different phases of
machine initialization.  We would like to allow different
monitor commands depending on the phase.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2020-11-12 09:38:36 -05:00
parent 5a1ee6077b
commit 2f181fbd5a
11 changed files with 73 additions and 32 deletions

View file

@ -216,7 +216,7 @@ static bool cmd_can_preconfig(const HMPCommand *cmd)
static bool cmd_available(const HMPCommand *cmd)
{
return qdev_hotplug || cmd_can_preconfig(cmd);
return phase_check(PHASE_MACHINE_READY) || cmd_can_preconfig(cmd);
}
static void help_cmd_dump_one(Monitor *mon,