summaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 'include')
-rw-r--r--include/sysemu/sysemu.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 285c45baf2..d8539fd602 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -146,11 +146,16 @@ extern int mem_prealloc;
*/
#define MAX_CPUMASK_BITS 255
-extern int nb_numa_nodes;
+extern int nb_numa_nodes; /* Number of NUMA nodes */
+extern int max_numa_nodeid; /* Highest specified NUMA node ID, plus one.
+ * For all nodes, nodeid < max_numa_nodeid
+ */
+
typedef struct node_info {
uint64_t node_mem;
DECLARE_BITMAP(node_cpu, MAX_CPUMASK_BITS);
struct HostMemoryBackend *node_memdev;
+ bool present;
} NodeInfo;
extern NodeInfo numa_info[MAX_NODES];
void set_numa_nodes(void);