diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2018-03-28 11:59:13 +0100 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2018-03-28 12:00:45 +0100 |
commit | adc91ab7854195f107c137aa197ddfe8b82a2331 (patch) | |
tree | 9669023ba1213678dd764866fece6f99758c7675 /arch/arm64/kvm/hyp/switch.c | |
parent | 7d8b44c54e0c7c8f688e3a07f17e6083f849f01f (diff) | |
download | linux-stable-adc91ab7854195f107c137aa197ddfe8b82a2331.tar.gz linux-stable-adc91ab7854195f107c137aa197ddfe8b82a2331.tar.bz2 linux-stable-adc91ab7854195f107c137aa197ddfe8b82a2331.zip |
Revert "arm64: KVM: Use SMCCC_ARCH_WORKAROUND_1 for Falkor BP hardening"
Creates far too many conflicts with arm64/for-next/core, to be
resent post -rc1.
This reverts commit f9f5dc19509bbef6f5e675346f1a7d7b846bdb12.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/kvm/hyp/switch.c')
-rw-r--r-- | arch/arm64/kvm/hyp/switch.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c index d9645236e474..07b572173265 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c @@ -472,6 +472,16 @@ int __hyp_text __kvm_vcpu_run_nvhe(struct kvm_vcpu *vcpu) /* And we're baaack! */ } while (fixup_guest_exit(vcpu, &exit_code)); + if (cpus_have_const_cap(ARM64_HARDEN_BP_POST_GUEST_EXIT)) { + u32 midr = read_cpuid_id(); + + /* Apply BTAC predictors mitigation to all Falkor chips */ + if (((midr & MIDR_CPU_MODEL_MASK) == MIDR_QCOM_FALKOR) || + ((midr & MIDR_CPU_MODEL_MASK) == MIDR_QCOM_FALKOR_V1)) { + __qcom_hyp_sanitize_btac_predictors(); + } + } + fp_enabled = __fpsimd_enabled_nvhe(); __sysreg_save_state_nvhe(guest_ctxt); |