From 8c85901ed3cf2ede1ed5957e6e047d3719dceb4e Mon Sep 17 00:00:00 2001 From: Wanlong Gao Date: Wed, 14 May 2014 17:43:07 +0800 Subject: NUMA: Add numa_info structure to contain numa nodes info Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao [Fix hw/ppc/spapr.c - Paolo] Signed-off-by: Paolo Bonzini Signed-off-by: Hu Tao Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- vl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index c87c7d8807..7af90cd41b 100644 --- a/vl.c +++ b/vl.c @@ -195,8 +195,7 @@ static QTAILQ_HEAD(, FWBootEntry) fw_boot_order = QTAILQ_HEAD_INITIALIZER(fw_boot_order); int nb_numa_nodes; -uint64_t node_mem[MAX_NODES]; -unsigned long *node_cpumask[MAX_NODES]; +NodeInfo numa_info[MAX_NODES]; uint8_t qemu_uuid[16]; bool qemu_uuid_set; @@ -2959,8 +2958,8 @@ int main(int argc, char **argv, char **envp) translation = BIOS_ATA_TRANSLATION_AUTO; for (i = 0; i < MAX_NODES; i++) { - node_mem[i] = 0; - node_cpumask[i] = bitmap_new(MAX_CPUMASK_BITS); + numa_info[i].node_mem = 0; + bitmap_zero(numa_info[i].node_cpu, MAX_CPUMASK_BITS); } nb_numa_nodes = 0; -- cgit v1.2.3