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

[Xen-devel] Arndale secondary CPU boot issue Was Re: [xen-unstable test] 60076: regressions - FAIL

On 29/07/15 15:15, Julien Grall wrote:
>>> Can it be that things are "just" slow, since we're creating a 4 vcpus
>>> guest on a 1 pcpu (not so powerful, I guess) host?
>> The arndale board has a 2 physical CPUs. Although it looks like that the
>> secondary cpu is never coming up:
>> Jul 28 01:35:39.057076 (XEN) Adding cpu 1 to runqueue 0
>> Jul 28 01:35:39.057104 (XEN) Bringing up CPU1
>> Jul 28 01:35:39.064998 (XEN) CPU1 never came online
>> Jul 28 01:35:40.065133 (XEN) Removing cpu 1 from runqueue 0
>> Jul 28 01:35:40.065176 (XEN) Failed to bring up CPU 1 (error -5)
>> This has been broken at some point in Xen 4.6. Xen 4.5 is booting with
>> the right number of physical on the Arndale.

I figured out what's going on. The problem interestingly came after the
commit which added the support of the ticket lock [1] in Xen.

While the problem is solved by reverting this patch, the source of the
issue is not because of a ticket lock issue with ARM (thanks god!).

The old implementation of spinlock is sending an event (via the assembly
instruction SEV) to the other physical CPUs. This will wake up the
others CPUs waiting on the assembly instruction WFE (Wait For Event).

It appears to be required on the Arndale to boot secondaries CPUs.
Although, depending on where I put the sev I don't have the same behavior:
        - sev in smp_init callback: the CPU is not coming up
        - sev before or after arch_cpu_up: the CPU is booting but not in HYP
mode [2]

I haven't yet figured out where the "sev" should be placed in order to
get the CPU boot correctly.

What I don't understand is how the placement of "sev" would affect the
secondary processor to boot in HYP mode or Kernel mode or nothing at all

This platform seems very picky and I don't remember having a
documentation about how the SMP boot works for this platform. Linux
seems to avoid the SEV for this platform.


[1] e10784ac424405c82accd0542fcc84cf468c53dc "use ticket locks for spin
[2] - CPU 00000001 booting -
    - Xen must be entered in NS Hyp mode -
    - Boot failed -

Julien Grall

Xen-devel mailing list



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