diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2012-12-17 18:07:52 +0100 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2013-06-07 15:03:40 +0200 |
commit | 092bd143cbb481b4ce1d55247a2987eaaf61f967 (patch) | |
tree | 3e0c7352f932e5d6af7946e4cc41fb1995127907 /arch/arm64/include | |
parent | arm64: KVM: guest one-reg interface (diff) | |
download | linux-092bd143cbb481b4ce1d55247a2987eaaf61f967.tar.xz linux-092bd143cbb481b4ce1d55247a2987eaaf61f967.zip |
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')
-rw-r--r-- | arch/arm64/include/asm/kvm_host.h | 13 |
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, 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__ */ |