summaryrefslogtreecommitdiffstats
path: root/numa.c
diff options
context:
space:
mode:
authorEduardo Habkost2014-06-26 23:33:18 +0200
committerMichael S. Tsirkin2014-06-29 17:59:41 +0200
commit1af878e0497a885b6cbdd3a6d91d399f4851d99c (patch)
tree2388d27edd4f4d3ad142b2bf6aafb42a997e038a /numa.c
parentAllow mismatched virtio config-len (diff)
downloadqemu-1af878e0497a885b6cbdd3a6d91d399f4851d99c.tar.gz
qemu-1af878e0497a885b6cbdd3a6d91d399f4851d99c.tar.xz
qemu-1af878e0497a885b6cbdd3a6d91d399f4851d99c.zip
numa: Keep track of NUMA nodes present on the command-line
Based on "enable sparse node numbering" patch from Nishanth Aravamudan, but without the code to actually support sparse node IDs. This just adds the code to keep track of present/non-present nodes on the command-line, without changing any behavior. Signed-off-by: Nishanth Aravamudan <nacc@linux.vnet.ibm.com> [Rename max_numa_node to max_numa_nodeid -Eduardo] [Initialize max_numa_nodeid to 0 -Eduardo] [Use MAX() macro when setting max_numa_nodeid -Eduardo] Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'numa.c')
-rw-r--r--numa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/numa.c b/numa.c
index 6c2eae7ef3..db10f954dd 100644
--- a/numa.c
+++ b/numa.c
@@ -106,6 +106,8 @@ static void numa_node_parse(NumaNodeOptions *node, QemuOpts *opts, Error **errp)
numa_info[nodenr].node_mem = object_property_get_int(o, "size", NULL);
numa_info[nodenr].node_memdev = MEMORY_BACKEND(o);
}
+ numa_info[nodenr].present = true;
+ max_numa_nodeid = MAX(max_numa_nodeid, nodenr + 1);
}
int numa_init_func(QemuOpts *opts, void *opaque)