arm64: Don't enable VHE for the kernel if OVERRIDE_HVHE is set
authorMarc Zyngier <maz@kernel.org>
Fri, 9 Jun 2023 16:21:48 +0000 (17:21 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 12 Jun 2023 23:17:23 +0000 (23:17 +0000)
commit7a26e1f51e3c26a1b4a1f087e2056f1554365682
tree60993c480e6a3cca7829db4b8116a9b837db451b
parente2d6c906f0ac69559da887c0a2c3c10070e746c5
arm64: Don't enable VHE for the kernel if OVERRIDE_HVHE is set

If the OVERRIDE_HVHE SW override is set (as a precursor of
the KVM_HVHE capability), do not enable VHE for the kernel
and drop to EL1 as if VHE was either disabled or unavailable.

Further changes will enable VHE at EL2 only, with the kernel
still running at EL1.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20230609162200.2024064-6-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kernel/hyp-stub.S