thebeanogamer / rpms / qemu-kvm

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