summaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/arm.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2020-09-18 14:08:54 +0100
committerWill Deacon <will@kernel.org>2020-09-29 16:08:17 +0100
commitd63d975a71b332df36cc802e6e77a462af6b9fef (patch)
tree6d9260546f2c21449a646437c281c74001765b15 /arch/arm64/kvm/arm.c
parent7311467702710cc30ac4e3a6c6670a766e7667f9 (diff)
downloadlinux-d63d975a71b332df36cc802e6e77a462af6b9fef.tar.gz
linux-d63d975a71b332df36cc802e6e77a462af6b9fef.tar.bz2
linux-d63d975a71b332df36cc802e6e77a462af6b9fef.zip
KVM: arm64: Convert ARCH_WORKAROUND_2 to arm64_get_spectre_v4_state()
Convert the KVM WA2 code to using the Spectre infrastructure, making the code much more readable. It also allows us to take SSBS into account for the mitigation. Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/arm.c')
-rw-r--r--arch/arm64/kvm/arm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/arm.c b/arch/arm64/kvm/arm.c
index b1bd2f4cd3e0..9b90a701462c 100644
--- a/arch/arm64/kvm/arm.c
+++ b/arch/arm64/kvm/arm.c
@@ -1292,7 +1292,7 @@ static void cpu_init_hyp_mode(void)
* at EL2.
*/
if (this_cpu_has_cap(ARM64_SSBS) &&
- arm64_get_ssbd_state() == ARM64_SSBD_FORCE_DISABLE) {
+ arm64_get_spectre_v4_state() == SPECTRE_VULNERABLE) {
kvm_call_hyp_nvhe(__kvm_enable_ssbs);
}
}