arm64: Allow sticky E2H when entering EL1
authorMarc Zyngier <maz@kernel.org>
Thu, 30 Jun 2022 16:04:54 +0000 (17:04 +0100)
committerWill Deacon <will@kernel.org>
Fri, 1 Jul 2022 14:22:51 +0000 (15:22 +0100)
commitae4b7e38e9a94798f08f5d66b02077900ab92903
tree2e324759702d7bed7ea30b8f3e6c9755073f3d64
parentb65e411d6cc2f12a728cabe66b930c63c527a340
arm64: Allow sticky E2H when entering EL1

For CPUs that have the unfortunate mis-feature to be stuck in
VHE mode, we perform a funny dance where we completely shortcut
the normal boot process to enable VHE and run the kernel at EL2,
and only then start booting the kernel.

Not only this is pretty ugly, but it means that the EL2 finalisation
occurs before we have processed the sysreg override.

Instead, start executing the kernel as if it was an EL1 guest and
rely on the normal EL2 finalisation to go back to EL2.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220630160500.1536744-4-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/head.S