KVM: arm64: nVHE: Migrate hyp-init to SMCCC
authorAndrew Scull <ascull@google.com>
Tue, 15 Sep 2020 10:46:42 +0000 (11:46 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 15 Sep 2020 17:39:04 +0000 (18:39 +0100)
commit04e4caa8d355d19fd7d26734bd2b9e3b563bb22a
tree1d34c6b73889f17c590e6870dda984c3e0cf7e06
parent054698316d87a13e4c0dc8f5ecdd77b12e5eb676
KVM: arm64: nVHE: Migrate hyp-init to SMCCC

To complete the transition to SMCCC, the hyp initialization is given a
function ID. This looks neater than comparing the hyp stub function IDs
to the page table physical address.

Some care is taken to only clobber x0-3 before the host context is saved
as only those registers can be clobbered accoring to SMCCC. Fortunately,
only a few acrobatics are needed. The possible new tpidr_el2 is moved to
the argument in x2 so that it can be stashed in tpidr_el2 early to free
up a scratch register. The page table configuration then makes use of
x0-2.

Signed-off-by: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200915104643.2543892-19-ascull@google.com
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/Makefile
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp.S [deleted file]
arch/arm64/kvm/hyp/nvhe/hyp-init.S