From: Russell King Date: Tue, 5 Jun 2018 09:03:27 +0000 (+0100) Subject: Merge branches 'fixes', 'misc' and 'spectre' into for-linus X-Git-Tag: v5.15~8701^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0ac000e86703dedea1000513dbb8a64d02930668;p=platform%2Fkernel%2Flinux-starfive.git Merge branches 'fixes', 'misc' and 'spectre' into for-linus --- 0ac000e86703dedea1000513dbb8a64d02930668 diff --cc arch/arm/include/asm/kvm_host.h index c6a7495,c6a7495,11f9174..8467e05 --- a/arch/arm/include/asm/kvm_host.h +++ b/arch/arm/include/asm/kvm_host.h @@@@ -308,11 -308,11 -312,17 +309,20 @@@@ static inline void kvm_arm_vhe_guest_ex static inline bool kvm_arm_harden_branch_predictor(void) { -- /* No way to detect it yet, pretend it is not there. */ -- return false; ++ switch(read_cpuid_part()) { ++ #ifdef CONFIG_HARDEN_BRANCH_PREDICTOR ++ case ARM_CPU_PART_BRAHMA_B15: ++ case ARM_CPU_PART_CORTEX_A12: ++ case ARM_CPU_PART_CORTEX_A15: ++ case ARM_CPU_PART_CORTEX_A17: ++ return true; ++ #endif ++ default: ++ return false; ++ } } +static inline void kvm_vcpu_load_sysregs(struct kvm_vcpu *vcpu) {} +static inline void kvm_vcpu_put_sysregs(struct kvm_vcpu *vcpu) {} + #endif /* __ARM_KVM_HOST_H__ */