[SeaBIOS] [PATCH] Fix bug in NUMA node setup - don't create SRAT if NUMA not present.
Kevin O'Connor
kevin at koconnor.net
Sun Mar 10 02:44:32 CET 2013
Make sure to check for the case where there are no NUMA nodes passed
in from QEMU.
Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
src/acpi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/acpi.c b/src/acpi.c
index 98a5d40..119d1c1 100644
--- a/src/acpi.c
+++ b/src/acpi.c
@@ -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) +
--
1.7.11.7
More information about the SeaBIOS
mailing list