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 <a...@ozlabs.ru> --- 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