arm64: Provide an 'upgrade to VHE' stub hypercall
authorMarc Zyngier <maz@kernel.org>
Mon, 8 Feb 2021 09:57:13 +0000 (09:57 +0000)
committerWill Deacon <will@kernel.org>
Mon, 8 Feb 2021 12:51:26 +0000 (12:51 +0000)
commitf359182291c757cdf77bcd014c025d1ed6b87662
tree88e93ba8771d6402f50b66cc0888543262f9870e
parent8cc8a32415364e475c25277b507f06f67c47ca9a
arm64: Provide an 'upgrade to VHE' stub hypercall

As we are about to change the way a VHE system boots, let's
provide the core helper, in the form of a stub hypercall that
enables VHE and replicates the full EL1 context at EL2, thanks
to EL1 and VHE-EL2 being extremely similar.

On exception return, the kernel carries on at EL2. Fancy!

Nothing calls this new hypercall yet, so no functional change.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: David Brazdil <dbrazdil@google.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Link: https://lore.kernel.org/r/20210208095732.3267263-5-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/virt.h
arch/arm64/kernel/hyp-stub.S