arm/arm64: KVM: Add hook for C-based stage2 init
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 1 Feb 2016 17:54:35 +0000 (17:54 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 29 Feb 2016 18:34:12 +0000 (18:34 +0000)
As we're about to move the stage2 init to C code, introduce some
C hooks that will later be populated with arch-specific implementations.

Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm/include/asm/kvm_host.h
arch/arm/kvm/arm.c
arch/arm64/include/asm/kvm_host.h

index f9f27792d8edc3d7a5f77b03ba72b0c051376f55..f1e86f1eb2e527e8417d182f7024e01d74f77c2b 100644 (file)
@@ -220,6 +220,10 @@ static inline void __cpu_init_hyp_mode(phys_addr_t boot_pgd_ptr,
        kvm_call_hyp((void*)hyp_stack_ptr, vector_ptr, pgd_ptr);
 }
 
+static inline void __cpu_init_stage2(void)
+{
+}
+
 static inline int kvm_arch_dev_ioctl_check_extension(long ext)
 {
        return 0;
index dda1959f0ddeb947e8a8020d7da0b02bb19f89cc..6b76e0152e58e2ea116ac31e32def891b5d1dad8 100644 (file)
@@ -985,6 +985,7 @@ static void cpu_init_hyp_mode(void *dummy)
        vector_ptr = (unsigned long)__kvm_hyp_vector;
 
        __cpu_init_hyp_mode(boot_pgd_ptr, pgd_ptr, hyp_stack_ptr, vector_ptr);
+       __cpu_init_stage2();
 
        kvm_arm_init_debug();
 }
index 689d4c95e12fbd0dd7c1cf7ca9521918f37aaab0..fe86cf9f288b9e381f2fc608d3ea9d5a658a25eb 100644 (file)
@@ -332,6 +332,10 @@ static inline void __cpu_init_hyp_mode(phys_addr_t boot_pgd_ptr,
                     hyp_stack_ptr, vector_ptr);
 }
 
+static inline void __cpu_init_stage2(void)
+{
+}
+
 static inline void kvm_arch_hardware_disable(void) {}
 static inline void kvm_arch_hardware_unsetup(void) {}
 static inline void kvm_arch_sync_events(struct kvm *kvm) {}