aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2012-12-17 12:07:52 -0500
committerMarc Zyngier <marc.zyngier@arm.com>2013-06-07 09:03:40 -0400
commit092bd143cbb481b4ce1d55247a2987eaaf61f967 (patch)
tree3e0c7352f932e5d6af7946e4cc41fb1995127907 /arch/arm64/include/asm/kvm_host.h
parent2f4a07c5f9fe4a5cdb9867e1e2fcab3165846ea7 (diff)
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/kvm_host.h')
-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 4a2622f5e81f..2500eb6a4d2a 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,
183int kvm_perf_init(void); 183int kvm_perf_init(void);
184int kvm_perf_teardown(void); 184int kvm_perf_teardown(void);
185 185
186static inline void __cpu_init_hyp_mode(phys_addr_t boot_pgd_ptr,
187 phys_addr_t pgd_ptr,
188 unsigned long hyp_stack_ptr,
189 unsigned long vector_ptr)
190{
191 /*
192 * Call initialization code, and switch to the full blown
193 * HYP code.
194 */
195 kvm_call_hyp((void *)boot_pgd_ptr, pgd_ptr,
196 hyp_stack_ptr, vector_ptr);
197}
198
186#endif /* __ARM64_KVM_HOST_H__ */ 199#endif /* __ARM64_KVM_HOST_H__ */