arm/arm64: KVM: Use __hyp_reset_vectors() directly
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 3 Apr 2017 18:37:59 +0000 (19:37 +0100)
committerChristoffer Dall <cdall@linaro.org>
Sun, 9 Apr 2017 14:49:32 +0000 (07:49 -0700)
__cpu_reset_hyp_mode doesn't need to be passed any argument now,
as the hyp-stub implementations are self-contained, and is now
reduced to just calling __hyp_reset_vectors(). Let's drop the
wrapper and use the stub hypercall directly.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
arch/arm/include/asm/kvm_host.h
arch/arm/kvm/arm.c
arch/arm64/include/asm/kvm_host.h

index adea3075318584de6271849f5c34fc7d5ddc08aa..d488b8866bc94321fd458f91447eae2c4788458d 100644 (file)
@@ -270,12 +270,6 @@ static inline void __cpu_init_stage2(void)
        kvm_call_hyp(__init_stage2_translation);
 }
 
-static inline void __cpu_reset_hyp_mode(unsigned long vector_ptr,
-                                       phys_addr_t phys_idmap_start)
-{
-       __hyp_reset_vectors();
-}
-
 static inline int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
 {
        return 0;
index 46fd37578693634c6180f0f3e6726daf8ac693fe..c8f4fa69104e82f8f56be647af9f84adf6142ddc 100644 (file)
@@ -1130,8 +1130,7 @@ static void cpu_hyp_reinit(void)
 static void cpu_hyp_reset(void)
 {
        if (!is_kernel_in_hyp_mode())
-               __cpu_reset_hyp_mode(hyp_default_vectors,
-                                    kvm_get_idmap_start());
+               __hyp_reset_vectors();
 }
 
 static void _kvm_arch_hardware_enable(void *discard)
index 0355dd1099562c01f9e4513f5c061f1bf9329a3e..578df18f66b79df81aeafa22f6b80b02a45ccfe9 100644 (file)
@@ -362,12 +362,6 @@ static inline void __cpu_init_hyp_mode(phys_addr_t pgd_ptr,
        __kvm_call_hyp((void *)pgd_ptr, hyp_stack_ptr, vector_ptr);
 }
 
-static inline void __cpu_reset_hyp_mode(unsigned long vector_ptr,
-                                       phys_addr_t phys_idmap_start)
-{
-       __hyp_reset_vectors();
-}
-
 static inline void kvm_arch_hardware_unsetup(void) {}
 static inline void kvm_arch_sync_events(struct kvm *kvm) {}
 static inline void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu) {}