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>
diff --git a/monitor/hmp.c b/monitor/hmp.c
index f2fe192..6c0b33a 100644
--- a/monitor/hmp.c
+++ b/monitor/hmp.c
@@ -216,7 +216,7 @@
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,