summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2012-12-17 17:07:52 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2013-06-07 14:03:40 +0100
commit092bd143cbb481b4ce1d55247a2987eaaf61f967 (patch)
tree3e0c7352f932e5d6af7946e4cc41fb1995127907 /arch/arm64/include/asm
parent2f4a07c5f9fe4a5cdb9867e1e2fcab3165846ea7 (diff)
downloadop-kernel-dev-092bd143cbb481b4ce1d55247a2987eaaf61f967.zip
op-kernel-dev-092bd143cbb481b4ce1d55247a2987eaaf61f967.tar.gz
arm64: KVM: hypervisor initialization code
Provide EL2 with page tables and stack, and set the vectors to point to the full blown world-switch code. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/include/asm')
-rw-r--r--arch/arm64/include/asm/kvm_host.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 4a2622f..2500eb6 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -183,4 +183,17 @@ int handle_exit(struct kvm_vcpu *vcpu, struct kvm_run *run,
int kvm_perf_init(void);
int kvm_perf_teardown(void);
+static inline void __cpu_init_hyp_mode(phys_addr_t boot_pgd_ptr,
+ phys_addr_t pgd_ptr,
+ unsigned long hyp_stack_ptr,
+ unsigned long vector_ptr)
+{
+ /*
+ * Call initialization code, and switch to the full blown
+ * HYP code.
+ */
+ kvm_call_hyp((void *)boot_pgd_ptr, pgd_ptr,
+ hyp_stack_ptr, vector_ptr);
+}
+
#endif /* __ARM64_KVM_HOST_H__ */
OpenPOWER on IntegriCloud