Skip to content

Commit f994c97

Browse files
mrutland-armpelwell
authored andcommitted
arm64: errata: Mitigate TLBI errata on various Arm CPUs
[ Early port of patch sent to linux-arm-kernel, minus documentation ] A number of CPUs developed by Arm suffer from errata whereby a broadcast TLBI;DSB sequence may complete before the global observation of writes which are translated by an affected TLB entry. These errata ONLY affect the completion of memory accesses which have been translated by an invalidated TLB entry, and these errata DO NOT affect the actual invalidation of TLB entries. TLB entries are removed correctly. This issue has been assigned CVE ID CVE-2025-10263. To mitigate this issue, Arm recommends that software follows any affected TLBI;DSB sequence with an additional TLBI;DSB, which will ensure that all memory write effects affected by the first TLBI have been globally observed. The additional TLBI can use any operation that is broadcast to affected CPUs, and the additional DSB can use any option that is sufficient to complete the additional TLBI. The ARM64_WORKAROUND_REPEAT_TLBI workaround is sufficient to mitigate the issue. Enable this workaround for affected CPUs, and update the silicon errata documentation accordingly. Note that due to the manner in which Arm develops IP and tracks errata, some CPUs share a common erratum number. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org>
1 parent 57083d8 commit f994c97

2 files changed

Lines changed: 64 additions & 2 deletions

File tree

arch/arm64/Kconfig

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,42 @@ config ARM64_ERRATUM_4193714
11671167

11681168
If unsure, say Y.
11691169

1170+
config ARM64_ERRATUM_4118414
1171+
bool "Cortex-*/Neoverse-*/C1-*: Completion of affected memory accesses might not be guaranteed by completion of a TLBI"
1172+
default y
1173+
select ARM64_WORKAROUND_REPEAT_TLBI
1174+
help
1175+
This option adds a workaround for the following errata:
1176+
1177+
* ARM C1-Premium erratum 4193780
1178+
* ARM C1-Ultra erratum 4193780
1179+
* ARM Cortex-A76 erratum 4193800
1180+
* ARM Cortex-A76AE erratum 4193801
1181+
* ARM Cortex-A77 erratum 4193798
1182+
* ARM Cortex-A78 erratum 4193791
1183+
* ARM Cortex-A78AE erratum 4193793
1184+
* ARM Cortex-A78C erratum 4193794
1185+
* ARM Cortex-A710 erratum 4193788
1186+
* ARM Cortex-X1 erratum 4193791
1187+
* ARM Cortex-X1C erratum 4193792
1188+
* ARM Cortex-X2 erratum 4193788
1189+
* ARM Cortex-X3 erratum 4193786
1190+
* ARM Cortex-X4 erratum 4118414
1191+
* ARM Cortex-X925 erratum 4193781
1192+
* ARM Neoverse-N1 erratum 4193800
1193+
* ARM Neoverse-N2 erratum 4193789
1194+
* ARM Neoverse-V1 erratum 4193790
1195+
* ARM Neoverse-V2 erratum 4193787
1196+
* ARM Neoverse-V3 erratum 4193784
1197+
* ARM Neoverse-V3AE erratum 4193784
1198+
1199+
On affected cores, some memory accesses might not be completed by
1200+
broadcast TLB invalidation.
1201+
1202+
This issue is also known as CVE-2025-10263.
1203+
1204+
If unsure, say Y.
1205+
11701206
config CAVIUM_ERRATUM_22375
11711207
bool "Cavium erratum 22375, 24313"
11721208
default y

arch/arm64/kernel/cpu_errata.c

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,33 @@ static const struct arm64_cpu_capabilities arm64_repeat_tlbi_list[] = {
316316
ERRATA_MIDR_RANGE(MIDR_CORTEX_A510, 0, 0, 1, 1),
317317
},
318318
#endif
319-
{},
319+
#ifdef CONFIG_ARM64_ERRATUM_4118414
320+
{
321+
ERRATA_MIDR_RANGE_LIST(((const struct midr_range[]) {
322+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A76),
323+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A76AE),
324+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A77),
325+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78),
326+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78AE),
327+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A78C),
328+
MIDR_ALL_VERSIONS(MIDR_CORTEX_A710),
329+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X1),
330+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X1C),
331+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X2),
332+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X3),
333+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X4),
334+
MIDR_ALL_VERSIONS(MIDR_CORTEX_X925),
335+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
336+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N2),
337+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V1),
338+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V2),
339+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3),
340+
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_V3AE),
341+
{}
342+
})),
343+
},
344+
#endif
345+
{}
320346
};
321347
#endif
322348

@@ -669,7 +695,7 @@ const struct arm64_cpu_capabilities arm64_errata[] = {
669695
#endif
670696
#ifdef CONFIG_ARM64_WORKAROUND_REPEAT_TLBI
671697
{
672-
.desc = "Qualcomm erratum 1009, or ARM erratum 1286807, 2441009",
698+
.desc = "Broken broadcast TLBI completion",
673699
.capability = ARM64_WORKAROUND_REPEAT_TLBI,
674700
.type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM,
675701
.matches = cpucap_multi_entry_cap_matches,

0 commit comments

Comments
 (0)