qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: qemu-devel@nongnu.org
Cc: Tao Xu <tao3.xu@intel.com>, Eduardo Habkost <ehabkost@redhat.com>
Subject: [PATCH 1/2] numa: remove not needed check
Date: Thu, 12 Dec 2019 13:48:55 +0100	[thread overview]
Message-ID: <1576154936-178362-2-git-send-email-imammedo@redhat.com> (raw)
In-Reply-To: <1576154936-178362-1-git-send-email-imammedo@redhat.com>

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>
---
 hw/core/numa.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/hw/core/numa.c b/hw/core/numa.c
index e3332a9..19f082d 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;
     }
-- 
2.7.4



  reply	other threads:[~2019-12-12 12:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 12:48 [PATCH 0/2] numa: stop abusing numa_mem_supported Igor Mammedov
2019-12-12 12:48 ` Igor Mammedov [this message]
2019-12-19 17:45   ` [PATCH 1/2] numa: remove not needed check Eduardo Habkost
2019-12-12 12:48 ` [PATCH 2/2] numa: properly check if numa is supported Igor Mammedov
2019-12-13  1:33   ` Tao Xu
2019-12-13  9:12     ` Igor Mammedov
2019-12-16  1:03       ` Tao Xu
2019-12-19 17:57   ` Eduardo Habkost
2019-12-19 13:28 ` [PATCH 0/2] numa: stop abusing numa_mem_supported Igor Mammedov
2019-12-19 13:30   ` Michael S. Tsirkin
2019-12-19 13:42     ` Igor Mammedov
2019-12-20 13:14       ` Paolo Bonzini
2019-12-20 15:11         ` Igor Mammedov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1576154936-178362-2-git-send-email-imammedo@redhat.com \
    --to=imammedo@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=tao3.xu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).