diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2018-05-29 13:11:18 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-05-31 18:00:59 +0100 |
commit | 5d81f7dc9bca4f4963092433e27b508cbe524a32 (patch) | |
tree | e31e1f9ca381c4bdbe67118b6e2dc79c634bd20c /arch/arm64/kvm/reset.c | |
parent | b4f18c063a13dfb33e3a63fe1844823e19c2265e (diff) | |
download | linux-5d81f7dc9bca4f4963092433e27b508cbe524a32.tar.gz linux-5d81f7dc9bca4f4963092433e27b508cbe524a32.tar.bz2 linux-5d81f7dc9bca4f4963092433e27b508cbe524a32.zip |
arm64: KVM: Add ARCH_WORKAROUND_2 discovery through ARCH_FEATURES_FUNC_ID
Now that all our infrastructure is in place, let's expose the
availability of ARCH_WORKAROUND_2 to guests. We take this opportunity
to tidy up a couple of SMCCC constants.
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kvm/reset.c')
-rw-r--r-- | arch/arm64/kvm/reset.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c index 3256b9228e75..a74311beda35 100644 --- a/arch/arm64/kvm/reset.c +++ b/arch/arm64/kvm/reset.c @@ -122,6 +122,10 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu) /* Reset PMU */ kvm_pmu_vcpu_reset(vcpu); + /* 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 */ return kvm_timer_vcpu_reset(vcpu); } |