KVM: arm64: nVHE: Migrate hyp interface to SMCCC
authorAndrew Scull <ascull@google.com>
Tue, 15 Sep 2020 10:46:41 +0000 (11:46 +0100)
committerMarc Zyngier <maz@kernel.org>
Tue, 15 Sep 2020 17:39:04 +0000 (18:39 +0100)
commit054698316d87a13e4c0dc8f5ecdd77b12e5eb676
treef01a73181cadd95e3968fa5b670788e69de2b911
parent0794a974d74dc777a212a3c58dd236f507360348
KVM: arm64: nVHE: Migrate hyp interface to SMCCC

Rather than passing arbitrary function pointers to run at hyp, define
and equivalent set of SMCCC functions.

Since the SMCCC functions are strongly tied to the original function
prototypes, it is not expected for the host to ever call an invalid ID
but a warning is raised if this does ever occur.

As __kvm_vcpu_run is used for every switch between the host and a guest,
it is explicitly singled out to be identified before the other function
IDs to improve the performance of the hot path.

Signed-off-by: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200915104643.2543892-18-ascull@google.com
arch/arm64/include/asm/kvm_asm.h
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp.S
arch/arm64/kvm/hyp/nvhe/hyp-main.c