On 13 December 2016 at 21:16, Andrew Jones <drjo...@redhat.com> wrote:
> On Tue, Dec 13, 2016 at 10:36:01AM +0000, Peter Maydell wrote:
>> This patchset adds support for the Virtualization extensions to QEMU's
>> GICv3 emulation.

> I've started some testing with this. When I boot an outer (L1) kernel
> with more than one cpu allocated I get
>
> [    3.441908] CPU: CPUs started in inconsistent modes
> [    3.442787] ------------[ cut here ]------------
> [    3.445434] WARNING: CPU: 0 PID: 1 at arch/arm64/kernel/smp.c:418 
> smp_cpus_done+0x80/0xa0
> ...
>
> and KVM does not init. Booting with only one cpu I see we do start in EL2
> and KVM does init.

This turns out to be a bug in QEMU's builtin PSCI implementation:
the CPU_ON call is supposed to start the new CPU in the highest
implemented-and-enabled NS exception level, but we were always
starting it in the exception level of the calling CPU. Since
Linux does its CPU_ON calls from EL1, this meant the new CPU got
started at EL1 rather than EL2.

I have a fix which I will put into v2 of the patchset (which I
will send mostly as an encouragement to further code review
since I don't think I've seen any other comments for things
I need to fix...)

thanks
-- PMM

Reply via email to