Skip to content

Commit 75b3c43

Browse files
mrutland-armctmarinas
authored andcommitted
arm64: errata: Expand speculative SSBS workaround
A number of Arm Ltd CPUs suffer from errata whereby an MSR to the SSBS special-purpose register does not affect subsequent speculative instructions, permitting speculative store bypassing for a window of time. We worked around this for Cortex-X4 and Neoverse-V3, in commit: 7187bb7 ("arm64: errata: Add workaround for Arm errata 3194386 and 3312417") ... as per their Software Developer Errata Notice (SDEN) documents: * Cortex-X4 SDEN v8.0, erratum 3194386: https://developer.arm.com/documentation/SDEN-2432808/0800/ * Neoverse-V3 SDEN v6.0, erratum 3312417: https://developer.arm.com/documentation/SDEN-2891958/0600/ Since then, similar errata have been published for a number of other Arm Ltd CPUs, for which the mitigation is the same. This is described in their respective SDEN documents: * Cortex-A710 SDEN v19.0, errataum 3324338 https://developer.arm.com/documentation/SDEN-1775101/1900/?lang=en * Cortex-A720 SDEN v11.0, erratum 3456091 https://developer.arm.com/documentation/SDEN-2439421/1100/?lang=en * Cortex-X2 SDEN v19.0, erratum 3324338 https://developer.arm.com/documentation/SDEN-1775100/1900/?lang=en * Cortex-X3 SDEN v14.0, erratum 3324335 https://developer.arm.com/documentation/SDEN-2055130/1400/?lang=en * Cortex-X925 SDEN v8.0, erratum 3324334 https://developer.arm.com/documentation/109108/800/?lang=en * Neoverse-N2 SDEN v17.0, erratum 3324339 https://developer.arm.com/documentation/SDEN-1982442/1700/?lang=en * Neoverse-V2 SDEN v9.0, erratum 3324336 https://developer.arm.com/documentation/SDEN-2332927/900/?lang=en Note that due to shared design lineage, some CPUs share the same erratum number. Add these to the existing mitigation under CONFIG_ARM64_ERRATUM_3194386. As listing all of the erratum IDs in the runtime description would be unwieldy, this is reduced to: "SSBS not fully self-synchronizing" ... matching the description of the errata in all of the SDENs. Signed-off-by: Mark Rutland <[email protected]> Cc: James Morse <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent ec76876 commit 75b3c43

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

Documentation/arch/arm64/silicon-errata.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,26 @@ stable kernels.
132132
+----------------+-----------------+-----------------+-----------------------------+
133133
| ARM | Cortex-A710 | #2224489 | ARM64_ERRATUM_2224489 |
134134
+----------------+-----------------+-----------------+-----------------------------+
135+
| ARM | Cortex-A710 | #3324338 | ARM64_ERRATUM_3194386 |
136+
+----------------+-----------------+-----------------+-----------------------------+
135137
| ARM | Cortex-A715 | #2645198 | ARM64_ERRATUM_2645198 |
136138
+----------------+-----------------+-----------------+-----------------------------+
139+
| ARM | Cortex-A720 | #3456091 | ARM64_ERRATUM_3194386 |
140+
+----------------+-----------------+-----------------+-----------------------------+
137141
| ARM | Cortex-X1 | #1502854 | N/A |
138142
+----------------+-----------------+-----------------+-----------------------------+
139143
| ARM | Cortex-X2 | #2119858 | ARM64_ERRATUM_2119858 |
140144
+----------------+-----------------+-----------------+-----------------------------+
141145
| ARM | Cortex-X2 | #2224489 | ARM64_ERRATUM_2224489 |
142146
+----------------+-----------------+-----------------+-----------------------------+
147+
| ARM | Cortex-X2 | #3324338 | ARM64_ERRATUM_3194386 |
148+
+----------------+-----------------+-----------------+-----------------------------+
149+
| ARM | Cortex-X3 | #3324335 | ARM64_ERRATUM_3194386 |
150+
+----------------+-----------------+-----------------+-----------------------------+
143151
| ARM | Cortex-X4 | #3194386 | ARM64_ERRATUM_3194386 |
144152
+----------------+-----------------+-----------------+-----------------------------+
153+
| ARM | Cortex-X925 | #3324334 | ARM64_ERRATUM_3194386 |
154+
+----------------+-----------------+-----------------+-----------------------------+
145155
| ARM | Neoverse-N1 | #1188873,1418040| ARM64_ERRATUM_1418040 |
146156
+----------------+-----------------+-----------------+-----------------------------+
147157
| ARM | Neoverse-N1 | #1349291 | N/A |
@@ -156,8 +166,12 @@ stable kernels.
156166
+----------------+-----------------+-----------------+-----------------------------+
157167
| ARM | Neoverse-N2 | #2253138 | ARM64_ERRATUM_2253138 |
158168
+----------------+-----------------+-----------------+-----------------------------+
169+
| ARM | Neoverse-N2 | #3324339 | ARM64_ERRATUM_3194386 |
170+
+----------------+-----------------+-----------------+-----------------------------+
159171
| ARM | Neoverse-V1 | #1619801 | N/A |
160172
+----------------+-----------------+-----------------+-----------------------------+
173+
| ARM | Neoverse-V2 | #3324336 | ARM64_ERRATUM_3194386 |
174+
+----------------+-----------------+-----------------+-----------------------------+
161175
| ARM | Neoverse-V3 | #3312417 | ARM64_ERRATUM_3194386 |
162176
+----------------+-----------------+-----------------+-----------------------------+
163177
| ARM | MMU-500 | #841119,826419 | N/A |

arch/arm64/Kconfig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,12 +1068,19 @@ config ARM64_ERRATUM_3117295
10681068
If unsure, say Y.
10691069

10701070
config ARM64_ERRATUM_3194386
1071-
bool "Cortex-X4/Neoverse-V3: workaround for MSR SSBS not self-synchronizing"
1071+
bool "Cortex-{A720,X4,X925}/Neoverse-V3: workaround for MSR SSBS not self-synchronizing"
10721072
default y
10731073
help
10741074
This option adds the workaround for the following errata:
10751075

1076+
* ARM Cortex-A710 erratam 3324338
1077+
* ARM Cortex-A720 erratum 3456091
1078+
* ARM Cortex-X2 erratum 3324338
1079+
* ARM Cortex-X3 erratum 3324335
10761080
* ARM Cortex-X4 erratum 3194386
1081+
* ARM Cortex-X925 erratum 3324334
1082+
* ARM Neoverse N2 erratum 3324339
1083+
* ARM Neoverse V2 erratum 3324336
10771084
* ARM Neoverse-V3 erratum 3312417
10781085

10791086
On affected cores "MSR SSBS, #0" instructions may not affect

arch/arm64/kernel/cpu_errata.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,15 @@ static const struct midr_range erratum_spec_unpriv_load_list[] = {
434434

435435
#ifdef CONFIG_ARM64_ERRATUM_3194386
436436
static const struct midr_range erratum_spec_ssbs_list[] = {
437+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A710),
438+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A720),
439+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X2),
440+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X3),
437441
MIDR_ALL_VERSIONS(MIDR_CORTEX_X4),
442+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X925),
443+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
438444
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3),
445+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2),
439446
{}
440447
};
441448
#endif
@@ -739,7 +746,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
739746
#endif
740747
#ifdef CONFIG_ARM64_ERRATUM_3194386
741748
{
742-
.desc = "ARM errata 3194386, 3312417",
749+
.desc = "SSBS not fully self-synchronizing",
743750
.capability = ARM64_WORKAROUND_SPECULATIVE_SSBS,
744751
ERRATA_MIDR_RANGE_LIST(erratum_spec_ssbs_list),
745752
},

0 commit comments

Comments
 (0)