diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2018-05-29 14:11:18 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-05-31 19:00:59 +0200 |
commit | 5d81f7dc9bca4f4963092433e27b508cbe524a32 (patch) | |
tree | e31e1f9ca381c4bdbe67118b6e2dc79c634bd20c /arch/arm64/kvm | |
parent | arm64: KVM: Handle guest's ARCH_WORKAROUND_2 requests (diff) | |
download | linux-5d81f7dc9bca4f4963092433e27b508cbe524a32.tar.xz 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')
-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); } |