aarch64: Enable use of ZT0
FEAT_SME2 adds the ZT0 register. Accesses to ZT0 trap to EL3 unless
SMCR_EL3.EZT0 is set, and so boot-wrapper support is necessary.
Support for FEAT_SME2 was added to Linux in v6.3 without any
boot-wrapper support. Consequently when SME2 is enabled in a model, any
attempt to access ZT0 (whether in userspace, kernel, or hypervisor) will
result in a hang. Linux will (only) access ZT0 during a context switch
when PSTATE.ZA==1, and so this hang is seen long after boot, when
applications first set PSTATE.ZA.
Add boot-wrapper support for ZT0, as described in the latest ARM ARM
(ARM DDI 0487 L.a), which can be found at:
https://developer.arm.com/documentation/ddi0487/la/?lang=en
All we need to do at EL3 is set SMCR_EL3.EZT0; it's up to lower ELs to
configure their SMCR_ELx register appropriately.
Cc: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20250511095211.1638852-4-mark.rutland@arm.com
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
2 files changed