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-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0ac000e86703dedea1000513dbb8a64d02930668;p=linux.git Merge branches 'fixes', 'misc' and 'spectre' into for-linus --- 0ac000e86703dedea1000513dbb8a64d02930668 diff --cc arch/arm/include/asm/kvm_host.h index c6a749568dd6c,c6a749568dd6c,11f91744ffb0f..8467e05360d7a --- 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__ */