From 991dfefdee8f4d1405f4b3cd799e7579f54b6c9f Mon Sep 17 00:00:00 2001 From: Vasilis Liaskovitis Date: Wed, 26 Oct 2011 14:19:00 +0200 Subject: Set numa topology for max_cpus qemu-kvm passes numa/SRAT topology information for smp_cpus to SeaBIOS. However SeaBIOS always expects to setup max_cpus number of SRAT cpu entries (MaxCountCPUs variable in build_srat function of Seabios). When qemu-kvm runs with smp_cpus != max_cpus (e.g. -smp 2,maxcpus=4), Seabios will mistakenly use memory SRAT info for setting up CPU SRAT entries for the offline CPUs. Wrong SRAT memory entries are also created. This breaks NUMA in a guest. Fix by setting up SRAT info for max_cpus in qemu-kvm. Signed-off-by: Vasilis Liaskovitis Signed-off-by: Marcelo Tosatti --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vl.c') diff --git a/vl.c b/vl.c index c03abb66ad..d9254243f8 100644 --- a/vl.c +++ b/vl.c @@ -3305,7 +3305,7 @@ int main(int argc, char **argv, char **envp) * real machines which also use this scheme. */ if (i == nb_numa_nodes) { - for (i = 0; i < smp_cpus; i++) { + for (i = 0; i < max_cpus; i++) { node_cpumask[i % nb_numa_nodes] |= 1 << i; } } -- cgit v1.2.3