qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/5] Tell BIOS about the number of CPUs (v2)


From: Anthony Liguori
Subject: [Qemu-devel] [PATCH 4/5] Tell BIOS about the number of CPUs (v2)
Date: Mon, 4 Feb 2008 09:11:04 -0600

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.

diff --git a/hw/pc.c b/hw/pc.c
index 64827be..de99879 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -210,6 +210,7 @@ static void cmos_init(ram_addr_t ram_size, ram_addr_t 
above_4g_mem_size,
         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

[Prev in Thread] Current Thread [Next in Thread]