diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2014-06-26 18:33:18 -0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2014-06-29 18:59:41 +0300 |
commit | 1af878e0497a885b6cbdd3a6d91d399f4851d99c (patch) | |
tree | 2388d27edd4f4d3ad142b2bf6aafb42a997e038a /numa.c | |
parent | 2f5732e9648fcddc8759a8fd25c0b41a38352be6 (diff) | |
download | qemu-1af878e0497a885b6cbdd3a6d91d399f4851d99c.zip qemu-1af878e0497a885b6cbdd3a6d91d399f4851d99c.tar.gz qemu-1af878e0497a885b6cbdd3a6d91d399f4851d99c.tar.bz2 |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) |