From 164dafd1744c69d268b89015977e19d8a9617fdf Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 27 Oct 2020 04:44:18 -0400 Subject: 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 Signed-off-by: Paolo Bonzini --- hw/core/machine-qmp-cmds.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'hw/core') diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 5362c80a18..cb9387c5f5 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -286,9 +286,8 @@ HotpluggableCPUList *qmp_query_hotpluggable_cpus(Error **errp) void qmp_set_numa_node(NumaOptions *cmd, Error **errp) { - if (!runstate_check(RUN_STATE_PRECONFIG)) { - error_setg(errp, "The command is permitted only in '%s' state", - RunState_str(RUN_STATE_PRECONFIG)); + if (qdev_hotplug) { + error_setg(errp, "The command is permitted only before the machine has been created"); return; } -- cgit v1.2.3-55-g7522