Previously, the BIOS would probe the CPUs for SMP guests.  This tends to be
very unreliably because of startup timing issues.  By passing the number of
CPUs in the CMOS, the BIOS can detect the number of CPUs much more reliably.

Since v1, I've incorporated Fabrice's feedback so this is now a 1-liner.

Index: qemu/hw/pc.c
===================================================================
--- qemu.orig/hw/pc.c   2008-02-01 11:53:47.000000000 -0600
+++ qemu/hw/pc.c        2008-02-01 11:53:52.000000000 -0600
@@ -210,6 +210,7 @@
         rtc_set_memory(s, 0x5c, (unsigned int)above_4g_mem_size >> 24);
         rtc_set_memory(s, 0x5d, (uint64_t)above_4g_mem_size >> 32);
     }
+    rtc_set_memory(s, 0x5f, smp_cpus - 1);
 
     if (ram_size > (16 * 1024 * 1024))
         val = (ram_size / 65536) - ((16 * 1024 * 1024) / 65536);


Reply via email to