From: Igor Mammedov Date: Thu, 12 Dec 2019 12:48:55 +0000 (+0100) Subject: numa: remove not needed check X-Git-Tag: v4.2.1~148 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=89eebb016dcedf08c26940dcecdab3db026e9e2c;p=thirdparty%2Fqemu.git numa: remove not needed check Currently parse_numa_node() is always called from already numa enabled context. Drop unnecessary check if numa is supported. Signed-off-by: Igor Mammedov Message-Id: <1576154936-178362-2-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost (cherry picked from commit 5275db59aa7ff8a26bd6aa5d07cb4d53de5cfab5) Signed-off-by: Michael Roth --- diff --git a/hw/core/numa.c b/hw/core/numa.c index e3332a984f7..19f082de128 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -83,10 +83,6 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node, return; } - if (!mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id) { - error_setg(errp, "NUMA is not supported by this machine-type"); - return; - } for (cpus = node->cpus; cpus; cpus = cpus->next) { CpuInstanceProperties props; if (cpus->value >= max_cpus) { @@ -178,9 +174,8 @@ void parse_numa_distance(MachineState *ms, NumaDistOptions *dist, Error **errp) void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp) { Error *err = NULL; - MachineClass *mc = MACHINE_GET_CLASS(ms); - if (!mc->numa_mem_supported) { + if (!ms->numa_state) { error_setg(errp, "NUMA is not supported by this machine-type"); goto end; }