qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 7/7] numa: Allow empty nodes


From: Alexey Kardashevskiy
Subject: [Qemu-devel] [PATCH 7/7] numa: Allow empty nodes
Date: Mon, 16 Jun 2014 17:53:53 +1000

Currently NUMA nodes must go consequently and QEMU ignores nodes
with @nodeid bigger than the number of NUMA nodes in the command line.
This prevents us from creating memory-less nodes which is possible
situation in POWERPC under pHyp or Sapphire.

This makes nb_numa_nodes a total number of nodes or the biggest node
number + 1 whichever is greater.

Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
 vl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vl.c b/vl.c
index ac0e3d7..f1b75cb 100644
--- a/vl.c
+++ b/vl.c
@@ -1356,7 +1356,7 @@ static void numa_add(const char *optarg)
         if (get_param_value(option, 128, "cpus", optarg) != 0) {
             numa_node_parse_cpus(nodenr, option);
         }
-        nb_numa_nodes++;
+        nb_numa_nodes = MAX(nb_numa_nodes + 1, nodenr + 1);
     } else {
         fprintf(stderr, "Invalid -numa option: %s\n", option);
         exit(1);
-- 
2.0.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]