cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
77c23f
From 348115bbd0d60fada6f7d9fa27848044690a4bc3 Mon Sep 17 00:00:00 2001
77c23f
From: "plai@redhat.com" <plai@redhat.com>
77c23f
Date: Thu, 21 May 2020 23:56:45 +0100
77c23f
Subject: [PATCH 02/12] numa: remove not needed check
77c23f
77c23f
RH-Author: plai@redhat.com
77c23f
Message-id: <20200521235655.27141-2-plai@redhat.com>
77c23f
Patchwork-id: 96738
77c23f
O-Subject: [RHEL8.2.1 AV qemu-kvm PATCH 01/11] numa: remove not needed check
77c23f
Bugzilla: 1600217
77c23f
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
77c23f
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
77c23f
RH-Acked-by: Eduardo Habkost <ehabkost@redhat.com>
77c23f
77c23f
From: Igor Mammedov <imammedo@redhat.com>
77c23f
77c23f
Currently parse_numa_node() is always called from already numa
77c23f
enabled context.
77c23f
Drop unnecessary check if numa is supported.
77c23f
77c23f
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
77c23f
Message-Id: <1576154936-178362-2-git-send-email-imammedo@redhat.com>
77c23f
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
77c23f
(cherry picked from commit 5275db59aa7ff8a26bd6aa5d07cb4d53de5cfab5)
77c23f
Signed-off-by: Paul Lai <plai@redhat.com>
77c23f
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
77c23f
---
77c23f
 hw/core/numa.c | 7 +------
77c23f
 1 file changed, 1 insertion(+), 6 deletions(-)
77c23f
77c23f
diff --git a/hw/core/numa.c b/hw/core/numa.c
77c23f
index e3332a9..19f082d 100644
77c23f
--- a/hw/core/numa.c
77c23f
+++ b/hw/core/numa.c
77c23f
@@ -83,10 +83,6 @@ static void parse_numa_node(MachineState *ms, NumaNodeOptions *node,
77c23f
         return;
77c23f
     }
77c23f
 
77c23f
-    if (!mc->cpu_index_to_instance_props || !mc->get_default_cpu_node_id) {
77c23f
-        error_setg(errp, "NUMA is not supported by this machine-type");
77c23f
-        return;
77c23f
-    }
77c23f
     for (cpus = node->cpus; cpus; cpus = cpus->next) {
77c23f
         CpuInstanceProperties props;
77c23f
         if (cpus->value >= max_cpus) {
77c23f
@@ -178,9 +174,8 @@ void parse_numa_distance(MachineState *ms, NumaDistOptions *dist, Error **errp)
77c23f
 void set_numa_options(MachineState *ms, NumaOptions *object, Error **errp)
77c23f
 {
77c23f
     Error *err = NULL;
77c23f
-    MachineClass *mc = MACHINE_GET_CLASS(ms);
77c23f
 
77c23f
-    if (!mc->numa_mem_supported) {
77c23f
+    if (!ms->numa_state) {
77c23f
         error_setg(errp, "NUMA is not supported by this machine-type");
77c23f
         goto end;
77c23f
     }
77c23f
-- 
77c23f
1.8.3.1
77c23f