summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2022-11-30 21:29:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-12-08 13:18:34 +0300
commit51febca41ae0333c29b4b12778f045a705d89370 (patch)
treea8d290589abdff7aca86bd2480c98d3c8d787081 /include
parent70133fb6e3cebb7c7b295d848f3ab76ee22ab4dd (diff)
downloadlinux-51febca41ae0333c29b4b12778f045a705d89370.tar.xz
arm64: errata: Fix KVM Spectre-v2 mitigation selection for Cortex-A57/A72
Both the Spectre-v2 and Spectre-BHB mitigations involve running a sequence immediately after exiting a guest, before any branches. In the stable kernels these sequences are built by copying templates into an empty vector slot. For Spectre-BHB, Cortex-A57 and A72 require the branchy loop with k=8. If Spectre-v2 needs mitigating at the same time, a firmware call to EL3 is needed. The work EL3 does at this point is also enough to mitigate Spectre-BHB. When enabling the Spectre-BHB mitigation, spectre_bhb_enable_mitigation() should check if a slot has already been allocated for Spectre-v2, meaning no work is needed for Spectre-BHB. This check was missed in the earlier backport, add it. Fixes: c20d55174479 ("arm64: Mitigate spectre style branch history side channels") Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions