path: root/arch/arm64/include/asm/kvm_asm.h
diff options
authorGeoff Levand <geoff@infradead.org>2016-04-27 17:47:03 +0100
committerAlex Shi <alex.shi@linaro.org>2016-11-17 09:49:37 +0800
commit1520ad1a147e2edd7cd65dd9ddcbbd222fdbe5cc (patch)
tree0d42fc0e33da8b5d62903e01f650623a1bb916ab /arch/arm64/include/asm/kvm_asm.h
parent46b1c4a370fbdef15423ba645772ab7e5486d711 (diff)
arm64: hyp/kvm: Make hyp-stub extensible
The existing arm64 hcall implementations are limited in that they only allow for two distinct hcalls; with the x0 register either zero or not zero. Also, the API of the hyp-stub exception vector routines and the KVM exception vector routines differ; hyp-stub uses a non-zero value in x0 to implement __hyp_set_vectors, whereas KVM uses it to implement kvm_call_hyp. To allow for additional hcalls to be defined and to make the arm64 hcall API more consistent across exception vector routines, change the hcall implementations to reserve all x0 values below 0xfff for hcalls such as {s,g}et_vectors(). Define two new preprocessor macros HVC_GET_VECTORS, and HVC_SET_VECTORS to be used as hcall type specifiers and convert the existing __hyp_get_vectors() and __hyp_set_vectors() routines to use these new macros when executing an HVC call. Also, change the corresponding hyp-stub and KVM el1_sync exception vector routines to use these new macros. Signed-off-by: Geoff Levand <geoff@infradead.org> [Merged two hcall patches, moved immediate value from esr to x0, use lr as a scratch register, changed limit to 0xfff] Signed-off-by: James Morse <james.morse@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> (cherry picked from commit ad72e59ff2bad55f6b9e7ac1fe5d824831ea2550) Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'arch/arm64/include/asm/kvm_asm.h')
0 files changed, 0 insertions, 0 deletions