mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
09e6b306f3
ARMv8.4 adds support for 'Memory Partitioning And Monitoring' (MPAM) which describes an interface to cache and bandwidth controls wherever they appear in the system. Add support to detect MPAM. Like SVE, MPAM has an extra id register that describes some more properties, including the virtualisation support, which is optional. Detect this separately so we can detect mismatched/insane systems, but still use MPAM on the host even if the virtualisation support is missing. MPAM needs enabling at the highest implemented exception level, otherwise the register accesses trap. The 'enabled' flag is accessible to lower exception levels, but its in a register that traps when MPAM isn't enabled. The cpufeature 'matches' hook is extended to test this on one of the CPUs, so that firmware can emulate MPAM as disabled if it is reserved for use by secure world. Secondary CPUs that appear late could trip cpufeature's 'lower safe' behaviour after the MPAM properties have been advertised to user-space. Add a verify call to ensure late secondaries match the existing CPUs. (If you have a boot failure that bisects here its likely your CPUs advertise MPAM in the id registers, but firmware failed to either enable or MPAM, or emulate the trap as if it were disabled) Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Joey Gouly <joey.gouly@arm.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20241030160317.2528209-4-joey.gouly@arm.com Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
110 lines
1.8 KiB
Plaintext
110 lines
1.8 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Internal CPU capabilities constants, keep this list sorted
|
|
|
|
ALWAYS_BOOT
|
|
ALWAYS_SYSTEM
|
|
BTI
|
|
# Unreliable: use system_supports_32bit_el0() instead.
|
|
HAS_32BIT_EL0_DO_NOT_USE
|
|
HAS_32BIT_EL1
|
|
HAS_ADDRESS_AUTH
|
|
HAS_ADDRESS_AUTH_ARCH_QARMA3
|
|
HAS_ADDRESS_AUTH_ARCH_QARMA5
|
|
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
|
WORKAROUND_858921
|
|
WORKAROUND_1418040
|
|
WORKAROUND_1463225
|
|
WORKAROUND_1508412
|
|
WORKAROUND_1542419
|
|
WORKAROUND_1742098
|
|
WORKAROUND_1902691
|
|
WORKAROUND_2038923
|
|
WORKAROUND_2064142
|
|
WORKAROUND_2077057
|
|
WORKAROUND_2457168
|
|
WORKAROUND_2645198
|
|
WORKAROUND_2658417
|
|
WORKAROUND_AMPERE_AC03_CPU_38
|
|
WORKAROUND_TRBE_OVERWRITE_FILL_MODE
|
|
WORKAROUND_TSB_FLUSH_FAILURE
|
|
WORKAROUND_TRBE_WRITE_OUT_OF_RANGE
|
|
WORKAROUND_CAVIUM_23154
|
|
WORKAROUND_CAVIUM_27456
|
|
WORKAROUND_CAVIUM_30115
|
|
WORKAROUND_CAVIUM_TX2_219_PRFM
|
|
WORKAROUND_CAVIUM_TX2_219_TVM
|
|
WORKAROUND_CLEAN_CACHE
|
|
WORKAROUND_DEVICE_LOAD_ACQUIRE
|
|
WORKAROUND_NVIDIA_CARMEL_CNP
|
|
WORKAROUND_QCOM_FALKOR_E1003
|
|
WORKAROUND_REPEAT_TLBI
|
|
WORKAROUND_SPECULATIVE_AT
|
|
WORKAROUND_SPECULATIVE_SSBS
|
|
WORKAROUND_SPECULATIVE_UNPRIV_LOAD
|