From 7a3099fc9c5c7789fa1613165812bbc8bd28ee52 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Fri, 4 May 2018 10:37:39 +0200 Subject: numa: postpone options post-processing till machine_run_board_init() in preparation for numa options to being handled via QMP before machine_run_board_init(), move final numa configuration checks and processing to machine_run_board_init() so it could take into account both CLI (via parse_numa_opts()) and QMP input Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost Message-Id: <1525423069-61903-2-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost --- numa.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'numa.c') diff --git a/numa.c b/numa.c index efc78b2..ad1d793 100644 --- a/numa.c +++ b/numa.c @@ -338,15 +338,11 @@ void numa_default_auto_assign_ram(MachineClass *mc, NodeInfo *nodes, nodes[i].node_mem = size - usedmem; } -void parse_numa_opts(MachineState *ms) +void numa_complete_configuration(MachineState *ms) { int i; MachineClass *mc = MACHINE_GET_CLASS(ms); - if (qemu_opts_foreach(qemu_find_opts("numa"), parse_numa, ms, NULL)) { - exit(1); - } - /* * If memory hotplug is enabled (slots > 0) but without '-numa' * options explicitly on CLI, guestes will break. @@ -433,6 +429,13 @@ void parse_numa_opts(MachineState *ms) } } +void parse_numa_opts(MachineState *ms) +{ + if (qemu_opts_foreach(qemu_find_opts("numa"), parse_numa, ms, NULL)) { + exit(1); + } +} + void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev, Error **errp) { int node_id = object_property_get_int(OBJECT(dev), "node-id", &error_abort); -- cgit v1.1