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

Re: [Xen-devel] [PATCH v2] xen: Allow CPU to be counted than currently "plugged".



On 17/06/13 16:24, Ian Campbell wrote:
> 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);
> 
> 

This patch definitely works. It was one of my two choices.

I though the other approch was better because of mtrr_setup() called
before this function, and some mtrr stuff in this function, but I did
not realize that mtrr_setup is not doing anything under Xen. So this
patch (no smp_probe) is better.

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.