diff options
author | Marc Zyngier <maz@kernel.org> | 2020-09-18 13:25:40 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2020-09-29 17:08:16 +0200 |
commit | 29e8910a566aad3ee72f729e45842858d51ced8d (patch) | |
tree | 24f724d8fc710a804931c0adcbe1418794491e56 /arch/arm64/kvm/reset.c | |
parent | arm64: Rewrite Spectre-v4 mitigation code (diff) | |
download | linux-29e8910a566aad3ee72f729e45842858d51ced8d.tar.xz linux-29e8910a566aad3ee72f729e45842858d51ced8d.zip |
KVM: arm64: Simplify handling of ARCH_WORKAROUND_2
Owing to the fact that the host kernel is always mitigated, we can
drastically simplify the WA2 handling by keeping the mitigation
state ON when entering the guest. This means the guest is either
unaffected or not mitigated.
This results in a nice simplification of the mitigation space,
and the removal of a lot of code that was never really used anyway.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/reset.c')
-rw-r--r-- | arch/arm64/kvm/reset.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c index ee33875c5c2a..f6e8b4a75cbb 100644 --- a/arch/arm64/kvm/reset.c +++ b/arch/arm64/kvm/reset.c @@ -319,10 +319,6 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu) vcpu->arch.reset_state.reset = false; } - /* Default workaround setup is enabled (if supported) */ - if (kvm_arm_have_ssbd() == KVM_SSBD_KERNEL) - vcpu->arch.workaround_flags |= VCPU_WORKAROUND_2_FLAG; - /* Reset timer */ ret = kvm_timer_vcpu_reset(vcpu); out: |