diff options
Diffstat (limited to 'arch/arm/kvm/arm.c')
-rw-r--r-- | arch/arm/kvm/arm.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 16f164a5db86..fc47bd721ab0 100644 --- a/arch/arm/kvm/arm.c +++ b/arch/arm/kvm/arm.c | |||
@@ -787,20 +787,22 @@ long kvm_arch_vm_ioctl(struct file *filp, | |||
787 | 787 | ||
788 | static void cpu_init_hyp_mode(void *vector) | 788 | static void cpu_init_hyp_mode(void *vector) |
789 | { | 789 | { |
790 | unsigned long long boot_pgd_ptr; | ||
790 | unsigned long long pgd_ptr; | 791 | unsigned long long pgd_ptr; |
791 | unsigned long hyp_stack_ptr; | 792 | unsigned long hyp_stack_ptr; |
792 | unsigned long stack_page; | 793 | unsigned long stack_page; |
793 | unsigned long vector_ptr; | 794 | unsigned long vector_ptr; |
794 | 795 | ||
795 | /* Switch from the HYP stub to our own HYP init vector */ | 796 | /* Switch from the HYP stub to our own HYP init vector */ |
796 | __hyp_set_vectors((unsigned long)vector); | 797 | __hyp_set_vectors(kvm_get_idmap_vector()); |
797 | 798 | ||
799 | boot_pgd_ptr = (unsigned long long)kvm_mmu_get_boot_httbr(); | ||
798 | pgd_ptr = (unsigned long long)kvm_mmu_get_httbr(); | 800 | pgd_ptr = (unsigned long long)kvm_mmu_get_httbr(); |
799 | stack_page = __get_cpu_var(kvm_arm_hyp_stack_page); | 801 | stack_page = __get_cpu_var(kvm_arm_hyp_stack_page); |
800 | hyp_stack_ptr = stack_page + PAGE_SIZE; | 802 | hyp_stack_ptr = stack_page + PAGE_SIZE; |
801 | vector_ptr = (unsigned long)__kvm_hyp_vector; | 803 | vector_ptr = (unsigned long)__kvm_hyp_vector; |
802 | 804 | ||
803 | __cpu_init_hyp_mode(pgd_ptr, hyp_stack_ptr, vector_ptr); | 805 | __cpu_init_hyp_mode(boot_pgd_ptr, pgd_ptr, hyp_stack_ptr, vector_ptr); |
804 | } | 806 | } |
805 | 807 | ||
806 | /** | 808 | /** |
@@ -854,11 +856,6 @@ static int init_hyp_mode(void) | |||
854 | } | 856 | } |
855 | 857 | ||
856 | /* | 858 | /* |
857 | * Unmap the identity mapping | ||
858 | */ | ||
859 | kvm_clear_hyp_idmap(); | ||
860 | |||
861 | /* | ||
862 | * Map the Hyp-code called directly from the host | 859 | * Map the Hyp-code called directly from the host |
863 | */ | 860 | */ |
864 | err = create_hyp_mappings(__kvm_hyp_code_start, __kvm_hyp_code_end); | 861 | err = create_hyp_mappings(__kvm_hyp_code_start, __kvm_hyp_code_end); |