[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/6] Tell BIOS about the number of CPUs
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 4/6] Tell BIOS about the number of CPUs |
Date: |
Thu, 31 Jan 2008 16:36:18 -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.
Index: qemu/hw/pc.c
===================================================================
--- qemu.orig/hw/pc.c 2008-01-30 13:47:37.000000000 -0600
+++ qemu/hw/pc.c 2008-01-30 13:47:40.000000000 -0600
@@ -182,7 +182,8 @@
/* hd_table must contain 4 block drivers */
static void cmos_init(ram_addr_t ram_size, ram_addr_t above_4g_mem_size,
- const char *boot_device, BlockDriverState **hd_table)
+ const char *boot_device, BlockDriverState **hd_table,
+ int smp_cpus)
{
RTCState *s = rtc_state;
int nbds, bds[3] = { 0, };
@@ -210,6 +211,7 @@
rtc_set_memory(s, 0x5c, (unsigned int)above_4g_mem_size >> 24);
rtc_set_memory(s, 0x5d, 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);
@@ -989,7 +991,7 @@
}
floppy_controller = fdctrl_init(i8259[6], 2, 0, 0x3f0, fd);
- cmos_init(ram_size, above_4g_mem_size, boot_device, hd);
+ cmos_init(ram_size, above_4g_mem_size, boot_device, hd, smp_cpus);
if (pci_enabled && usb_enabled) {
usb_uhci_piix3_init(pci_bus, piix3_devfn + 2);
[Qemu-devel] [PATCH 3/6] Fix daemonize options, Anthony Liguori, 2008/01/31
[Qemu-devel] [PATCH 6/6] QEMU support for the Kernel Virtual Machine interface, Anthony Liguori, 2008/01/31
[Qemu-devel] [PATCH 2/6] SCI fixes, Anthony Liguori, 2008/01/31
[Qemu-devel] [PATCH 4/6] Tell BIOS about the number of CPUs,
Anthony Liguori <=
Re: [qemu-devel] [PATCH 0/6] Support for the Kernel Virtual Machine interface, Anthony Liguori, 2008/01/31