KVM: arm64: nVHE: Switch to hyp context for EL2
authorAndrew Scull <ascull@google.com>
Tue, 15 Sep 2020 10:46:36 +0000 (11:46 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 15 Sep 2020 17:39:03 +0000 (18:39 +0100)
commit4e3393a969a0bdaae83263918b6824b2d08c3996
tree327744162b7e9be685044a5ca25fb24914380c0c
parent603d2bdaa57e48a33d57eeb88971b88fbe5875d6
KVM: arm64: nVHE: Switch to hyp context for EL2

Save and restore the host context when switching to and from hyp. This
gives hyp its own context that the host will not see as a step towards a
full trust boundary between the two.

SP_EL0 and pointer authentication keys are currently shared between the
host and hyp so don't need to be switched yet.

Signed-off-by: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200915104643.2543892-13-ascull@google.com
arch/arm64/kvm/hyp/include/hyp/switch.h
arch/arm64/kvm/hyp/nvhe/Makefile
arch/arm64/kvm/hyp/nvhe/host.S
arch/arm64/kvm/hyp/nvhe/hyp-main.c [new file with mode: 0644]