[SeaBIOS] [PATCH RFC 1/2] paravirt: disable MPTable in case of more than 255 CPUs

Igor Mammedov imammedo at redhat.com
Mon May 9 11:43:53 CEST 2016


MPTable doesn't support more than 254 CPUs and
QEMU supplies an alternative MADT table which
guest will use instead of it. So do not install
MPTable if more than 254 CPUs are provided.

Signed-off-by: Igor Mammedov <imammedo at redhat.com>
---
 src/fw/mptable.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/fw/mptable.c b/src/fw/mptable.c
index 47385cc..aec26f8 100644
--- a/src/fw/mptable.c
+++ b/src/fw/mptable.c
@@ -24,6 +24,10 @@ mptable_setup(void)
     if (! CONFIG_MPTABLE)
         return;
 
+    if (romfile_loadint("etc/max-cpus", 0) > 255) {
+        dprintf(1, "MPTable doesn't support more than 254 CPUs. Skip it.\n");
+        return;
+    }
     dprintf(3, "init MPTable\n");
 
     // Config structure in temp area.
-- 
1.8.3.1




More information about the SeaBIOS mailing list