[PATCH v1 13/24] kvm: arm64: Add CPU entry point in nVHE hyp

Marc Zyngier maz at kernel.org
Mon Nov 16 07:40:34 EST 2020


On 2020-11-16 11:49, David Brazdil wrote:
>> >  #ifdef CONFIG_CPU_PM
>> >    DEFINE(CPU_CTX_SP,		offsetof(struct cpu_suspend_ctx, sp));
>> > diff --git a/arch/arm64/kvm/hyp/nvhe/hyp-init.S
>> > b/arch/arm64/kvm/hyp/nvhe/hyp-init.S
>> > index 1697d25756e9..f999a35b2c8c 100644
>> > --- a/arch/arm64/kvm/hyp/nvhe/hyp-init.S
>> > +++ b/arch/arm64/kvm/hyp/nvhe/hyp-init.S
>> > @@ -6,6 +6,7 @@
>> >
>> >  #include <linux/arm-smccc.h>
>> >  #include <linux/linkage.h>
>> > +#include <linux/irqchip/arm-gic-v3.h>
>> 
>> This should probably be included from the file that provides 
>> init_el2_state.
> 
> Agreed. This is a workaround for the fact that the arm-gic* headers 
> don't play
> nice with each other (define the same constants).

Ah, that...

> Including arm-gic-v3.h in
> kvm_asm.h will trigger macro redefine warnings in vgic*-v2.c because 
> they
> include arm-gic.h.

Boo.

> Another option is to create a header just for el2 init. Would that be
> preferable? Other ideas?

Having an asm/el2_setup.h file feels like a better option. After all, it
is in no way KVM specific, and having the macros hanging around in
asm/kvm_asm.h feels odd.

         M.
-- 
Jazz is not dead. It just smells funny...



More information about the linux-arm-kernel mailing list