[PATCH v2 2/3] arm64: Cope with CPUs stuck in VHE mode

Will Deacon will at kernel.org
Wed Apr 7 22:16:38 BST 2021


On Tue, Mar 30, 2021 at 06:39:46PM +0100, Marc Zyngier wrote:
> It seems that the CPUs part of the SoC known as Apple M1 have the
> terrible habit of being stuck with HCR_EL2.E2H==1, in violation
> of the architecture.
> 
> Try and work around this deplorable state of affairs by detecting
> the stuck bit early and short-circuit the nVHE dance. Additional
> filtering code ensures that attempts at switching to nVHE from
> the command-line are also ignored.
> 
> It is still unknown whether there are many more such nuggets
> to be found...
> 
> Reported-by: Hector Martin <marcan at marcan.st>
> Signed-off-by: Marc Zyngier <maz at kernel.org>
> ---
>  arch/arm64/kernel/head.S           | 39 +++++++++++++++++++++++++++---
>  arch/arm64/kernel/hyp-stub.S       |  8 +++---
>  arch/arm64/kernel/idreg-override.c | 13 +++++++++-
>  3 files changed, 52 insertions(+), 8 deletions(-)

Acked-by: Will Deacon <will at kernel.org>

Will



More information about the linux-arm-kernel mailing list