]> xenbits.xensource.com Git - seabios.git/commitdiff
Fix bug in NUMA node setup - don't create SRAT if NUMA not present.
authorKevin O'Connor <kevin@koconnor.net>
Sun, 10 Mar 2013 01:43:00 +0000 (20:43 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sun, 10 Mar 2013 01:43:00 +0000 (20:43 -0500)
Make sure to check for the case where there are no NUMA nodes passed
in from QEMU.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/acpi.c

index 98a5d40bd261df8191580ad5e7a78f26c05a6c3a..119d1c18d40f0c10c517c88e65952a194e2317d9 100644 (file)
@@ -655,6 +655,8 @@ build_srat(void)
         return NULL;
     int max_cpu = romfile_loadint("etc/max-cpus", 0);
     int nb_numa_nodes = (filesize / sizeof(u64)) - max_cpu;
+    if (!nb_numa_nodes)
+        return NULL;
 
     struct system_resource_affinity_table *srat;
     int srat_size = sizeof(*srat) +