linux/arch/arm64/kvm
Geoff Levand ad72e59ff2 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>
2016-04-28 12:05:46 +01:00
..
hyp arm64: hyp/kvm: Make hyp-stub extensible 2016-04-28 12:05:46 +01:00
debug.c KVM: arm64: add trace points for guest_debug debug 2015-07-21 12:50:43 +01:00
emulate.c
guest.c One of the largest releases for KVM... Hardly any generic improvement, 2016-03-16 09:55:35 -07:00
handle_exit.c arm64: KVM: Turn system register numbers to an enum 2015-12-14 11:30:43 +00:00
hyp-init.S arm64: Cleanup SCTLR flags 2016-04-28 12:05:46 +01:00
hyp.S arm64: hyp/kvm: Make hyp-stub extensible 2016-04-28 12:05:46 +01:00
inject_fault.c arm64: KVM: Fix AArch64 guest userspace exception injection 2016-01-24 21:55:57 +00:00
Kconfig arm64: KVM: Define PMU data structure for each vcpu 2016-02-29 18:34:19 +00:00
Makefile arm64: KVM: Add access handler for event counter register 2016-02-29 18:34:20 +00:00
regmap.c
reset.c arm64: KVM: Introduce per-vcpu kvm device controls 2016-02-29 18:34:21 +00:00
sys_regs_generic_v8.c arm64: KVM: Correctly handle zero register in system register accesses 2015-12-04 16:29:54 +00:00
sys_regs.c arm64 updates for 4.6: 2016-03-17 20:03:47 -07:00
sys_regs.h arm64: KVM: Correctly handle zero register in system register accesses 2015-12-04 16:29:54 +00:00
trace.h KVM: arm64: add trace points for guest_debug debug 2015-07-21 12:50:43 +01:00