>From 62068b8856705dcc4e1c051b6a28233a747c39c9 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Thu, 13 Mar 2008 14:02:04 +0100 Subject: [PATCH] Tell BIOS about the number of CPUs 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. (Anthony Liguori) --- hw/pc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index b3885e8..7348e60 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -213,6 +213,9 @@ static void cmos_init(int ram_size, const char *boot_device, BlockDriverState ** rtc_set_memory(s, 0x34, val); rtc_set_memory(s, 0x35, val >> 8); + /* set the number of CPU */ + rtc_set_memory(s, 0x5f, smp_cpus - 1); + /* set boot devices, and disable floppy signature check if requested */ #define PC_MAX_BOOT_DEVICES 3 nbds = strlen(boot_device); -- 1.5.4.3