]> git.proxmox.com Git - mirror_qemu.git/blobdiff - hw/core/machine-qmp-cmds.c
machine: introduce MachineInitPhase
[mirror_qemu.git] / hw / core / machine-qmp-cmds.c
index cb9387c5f56c68ca14d68c0e129c6054544c6cdd..87f14140a38160814a4b7f135839df519d81448f 100644 (file)
@@ -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);