aboutsummaryrefslogtreecommitdiff
path: root/hw/core/machine-qmp-cmds.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-11-12 09:38:36 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2020-12-15 12:51:52 -0500
commit2f181fbd5a9d456d1da291bea61d7e3ad10ec7d1 (patch)
treef6be4e559a9b9a95a2870caf0fc323e7ca6778e7 /hw/core/machine-qmp-cmds.c
parent5a1ee6077b89ee9a803aaf8d1c98004701f63684 (diff)
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>
Diffstat (limited to 'hw/core/machine-qmp-cmds.c')
-rw-r--r--hw/core/machine-qmp-cmds.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index cb9387c5f5..87f14140a3 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -286,9 +286,9 @@ HotpluggableCPUList *qmp_query_hotpluggable_cpus(Error **errp)
void qmp_set_numa_node(NumaOptions *cmd, Error **errp)
{
- if (qdev_hotplug) {
- error_setg(errp, "The command is permitted only before the machine has been created");
- return;
+ if (phase_check(PHASE_MACHINE_INITIALIZED)) {
+ error_setg(errp, "The command is permitted only before the machine has been created");
+ return;
}
set_numa_options(MACHINE(qdev_get_machine()), cmd, errp);