]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite011d7503a1a58935b4a2d8f87a49af34d78b767
tree327744162b7e9be685044a5ca25fb24914380c0c
parentf5bcb076b39b7040279fcdff42d1866abddfdbc3
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]