[TRUSTY ARM/ARM64] [PULL] UBUNTU: support reboot and poweroff for VM

Ming Lei ming.lei at canonical.com
Tue May 26 08:36:24 UTC 2015


On Tue, May 26, 2015 at 3:44 PM, Luis Henriques
<luis.henriques at canonical.com> wrote:
> On Fri, May 15, 2015 at 05:26:49PM +0800, Ming Lei wrote:
>> Hi,
>>
>> The current trusty kernel can't support 'reboot' and 'poweroff' for
>> arm64 and arm VM because of missing KVM PSCI v0.2 feature.
>>
>
> This patchset is breaking the build of arm64.  I'm seeing the
> following error:
>
> /tmp/kernel-henrix-IHjGGJNY/build/arch/arm64/kvm/../../../arch/arm/kvm/psci.c: In function 'psci_affinity_mask':
> /tmp/kernel-henrix-IHjGGJNY/build/arch/arm64/kvm/../../../arch/arm/kvm/psci.c:30:53: error: 'MPIDR_LEVEL_BITS' undeclared (first use in this function)
>  #define AFFINITY_MASK(level) ~((0x1UL << ((level) * MPIDR_LEVEL_BITS)) - 1)
>                                                      ^
> /tmp/kernel-henrix-IHjGGJNY/build/arch/arm64/kvm/../../../arch/arm/kvm/psci.c:35:31: note: in expansion of macro 'AFFINITY_MASK'
>    return MPIDR_HWID_BITMASK & AFFINITY_MASK(affinity_level);
>                                ^
> /tmp/kernel-henrix-IHjGGJNY/build/arch/arm64/kvm/../../../arch/arm/kvm/psci.c:30:53: note: each undeclared identifier is reported only once for each function it appears in
>  #define AFFINITY_MASK(level) ~((0x1UL << ((level) * MPIDR_LEVEL_BITS)) - 1)
>                                                      ^
> /tmp/kernel-henrix-IHjGGJNY/build/arch/arm64/kvm/../../../arch/arm/kvm/psci.c:35:31: note: in expansion of macro 'AFFINITY_MASK'
>    return MPIDR_HWID_BITMASK & AFFINITY_MASK(affinity_level);
>                                ^
>   CC      lib/lockref.o
> make[3]: *** [arch/arm64/kvm/../../../arch/arm/kvm/psci.o] Error 1
>
> Looks like there's an #include missing somewhere, as MPIDR_LEVEL_BITS
> is defined in arch/arm/include/asm/cputype.h

You are right, the commit b058450f38c33(arm64: kernel: add
MPIDR_EL1 accessors macros) should have been backported
before the whole set.

It passed my test becasue I just built VM kernel without enalbing
KVM, sorry for that.

Now in the following branch, I revert the patchset, and apply
the commit b058450 first, then following the whole patchset.

 git://kernel.ubuntu.com/git/ming/ubuntu-trusty.git  kvm-psci-backport-v1


Thanks,
Ming




More information about the kernel-team mailing list