arm64: Check if GMID_EL1.BS is the same on all CPUs
authorCatalin Marinas <catalin.marinas@arm.com>
Wed, 26 May 2021 19:36:21 +0000 (20:36 +0100)
committerWill Deacon <will@kernel.org>
Wed, 26 May 2021 21:05:07 +0000 (22:05 +0100)
commit21047e91a5a674b97ebbf2c2c1751f1e9c317f09
tree21524e7af7b2d9514d5ae9e27c67af0db8c193c2
parent7513cc8a1b741bee6fb39cbb94a9842d37ca3ace
arm64: Check if GMID_EL1.BS is the same on all CPUs

The GMID_EL1.BS field determines the number of tags accessed by the
LDGM/STGM instructions (EL1 and up), used by the kernel for copying or
zeroing page tags.

Taint the kernel if GMID_EL1.BS differs between CPUs but only of
CONFIG_ARM64_MTE is enabled.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki K Poulose <Suzuki.Poulose@arm.com>
Link: https://lore.kernel.org/r/20210526193621.21559-3-catalin.marinas@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/cpu.h
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kernel/cpuinfo.c