summaryrefslogtreecommitdiffstats
path: root/hw/core/numa.c
diff options
context:
space:
mode:
authorIgor Mammedov2019-12-12 13:48:55 +0100
committerEduardo Habkost2019-12-19 18:54:11 +0100
commit5275db59aa7ff8a26bd6aa5d07cb4d53de5cfab5 (patch)
tree1032d7ac4b0e583f6a4a07d90f6430574c60baaf /hw/core/numa.c
parenti386: Resolve CPU models to v1 by default (diff)
downloadqemu-5275db59aa7ff8a26bd6aa5d07cb4d53de5cfab5.tar.gz
qemu-5275db59aa7ff8a26bd6aa5d07cb4d53de5cfab5.tar.xz
qemu-5275db59aa7ff8a26bd6aa5d07cb4d53de5cfab5.zip
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 <imammedo@redhat.com> Message-Id: <1576154936-178362-2-git-send-email-imammedo@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/core/numa.c')
-rw-r--r--hw/core/numa.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/hw/core/numa.c b/hw/core/numa.c
index e3332a984f..19f082de12 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;
}