From: Ian Campbell Subject: Re: [PATCH v2] xen: Allow CPU to be counted than currently "plugged". Date: Mon, 17 Jun 2013 16:24:29 +0100 Message-ID: <1371482669.8055.10.camel@dagon.hellion.org.uk> References: <1371478402-28082-1-git-send-email-anthony.perard@citrix.com> <1371478955-29750-1-git-send-email-anthony.perard@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1371478955-29750-1-git-send-email-anthony.perard@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Anthony PERARD Cc: Stefano Stabellini , Xen Devel List-Id: xen-devel@lists.xenproject.org On Mon, 2013-06-17 at 15:22 +0100, Anthony PERARD wrote: > Under Xen, SeaBIOS can count more CPU than there should be. This patch > will allow more CPU to come up instead of going to infinite loop waiting > for the CPU counter to be decremented. Current upstream SeaBIOS has this very different and only runs this loop on Qemu. At a minimum I think we would need to backport: 5dbf173 Only perform SMP setup on QEMU. 897fb11 Consistently use CONFIG_COREBOOT, CONFIG_QEMU, and runningOnXen(). We've currently got SeaBIOS 1.7.1 in our tree and these are only in the master branch, but I think backporting is the way to go. Hrm, 897fb11 doesn't backport cleanly (lots of changes) and without it 5dbf173 doesn't backport cleanly either. But I think the net affect when running on Xen would be the same as the following, can you try it? diff --git a/src/smp.c b/src/smp.c index 3c36f8c..fb55a6e 100644 --- a/src/smp.c +++ b/src/smp.c @@ -84,6 +84,9 @@ int apic_id_is_present(u8 apic_id) void smp_probe(void) { + if (usingXen()) + return; + ASSERT32FLAT(); u32 eax, ebx, ecx, cpuid_features; cpuid(1, &eax, &ebx, &ecx, &cpuid_features);