From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JL47r-0008Us-Gn for qemu-devel@nongnu.org; Fri, 01 Feb 2008 17:12:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JL47l-0008QO-Ft for qemu-devel@nongnu.org; Fri, 01 Feb 2008 17:12:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JL47k-0008QB-IO for qemu-devel@nongnu.org; Fri, 01 Feb 2008 17:12:40 -0500 Received: from e32.co.us.ibm.com ([32.97.110.150]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JL47k-0002fo-4x for qemu-devel@nongnu.org; Fri, 01 Feb 2008 17:12:40 -0500 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e32.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id m11L92MJ027580 for ; Fri, 1 Feb 2008 16:09:02 -0500 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v8.7) with ESMTP id m11MCXbB133754 for ; Fri, 1 Feb 2008 15:12:33 -0700 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m11MCWxi022668 for ; Fri, 1 Feb 2008 15:12:33 -0700 From: Anthony Liguori Date: Fri, 1 Feb 2008 16:12:00 -0600 Message-Id: <1201903921-1125-6-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1201903921-1125-1-git-send-email-aliguori@us.ibm.com> References: <1201903921-1125-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 5/6] Tell BIOS about the number of CPUs (v2) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm-devel@lists.sourceforge.net, Paul Brook 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);