linux-yocto/arch/arm64/tools
Mark Rutland 93696d8f96 arm64: errata: Add workaround for Arm errata 3194386 and 3312417
[ Upstream commit 7187bb7d0b ]

Cortex-X4 and Neoverse-V3 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. This is described in 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/

To workaround these errata, it is necessary to place a speculation
barrier (SB) after MSR to the SSBS special-purpose register. This patch
adds the requisite SB after writes to SSBS within the kernel, and hides
the presence of SSBS from EL0 such that userspace software which cares
about SSBS will manipulate this via prctl(PR_GET_SPECULATION_CTRL, ...).

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240508081400.235362-5-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
[ Mark: fix conflicts, drop unneeded cpucaps.h, fold in user_feature_fixup() ]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-14 13:58:48 +02:00
..
cpucaps arm64: errata: Add workaround for Arm errata 3194386 and 3312417 2024-08-14 13:58:48 +02:00
gen-cpucaps.awk arm64/cpucaps: increase string width to properly format cpucaps.h 2023-06-06 17:23:27 +01:00
gen-sysreg.awk arm64/sysreg: allow *Enum blocks in SysregFields blocks 2023-04-06 15:28:54 +01:00
Makefile arm64/sysreg: Enable automatic generation of system register definitions 2022-05-04 15:30:28 +01:00
sysreg arm64: cpufeature: Fix CLRBHB and BC detection 2023-09-18 10:45:11 +01:00