[PATCH] KVM: arm64: Fix kvm_vcpu_{set,is}_be() to deal with EL2 state
Marc Zyngier
maz at kernel.org
Wed Sep 17 01:21:34 PDT 2025
On Wed, 17 Sep 2025 06:21:09 +0100,
Oliver Upton <oliver.upton at linux.dev> wrote:
>
> On Tue, Sep 16, 2025 at 05:11:03PM +0100, Marc Zyngier wrote:
> > Nobody really cares about BE, but KVM currently only deals with
> > SCTLR_EL1 when evaluating or setting the endianness in PSCI,
> > meaning that we evaluate whatever the L2 state has been at some point.
> >
> > Teach these primitives about SCTLR_EL2, and forget about BE...
> >
> > Signed-off-by: Marc Zyngier <maz at kernel.org>
>
> You know, I was about to say "don't we need to sanitise this?" although
> that seems to already be in place. Nice.
Only for SCTLR_EL1.
SCTLR_EL2, annoyingly enough, isn't, owing to plenty of bits depending
on E2H. It's on my long list of things to address, but I'd like a
common mechanism that'd deal with horrors such as CNTHCTL_EL2...
> Reviewed-by: Oliver Upton <oliver.upton at linux.dev>
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
More information about the linux-arm-kernel
mailing list