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: for-linus-20180616~65^2 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=0ac000e86703dedea1000513dbb8a64d02930668;p=linux-block.git Merge branches 'fixes', 'misc' and 'spectre' into for-linus --- 0ac000e86703dedea1000513dbb8a64d02930668 diff --cc arch/arm/include/asm/kvm_host.h index c6a749568dd6,c6a749568dd6,11f91744ffb0..8467e05360d7 --- 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__ */