arm64: FPSIMD/SVE/SME fixes + re-enable SME
From: | Mark Rutland <mark.rutland-AT-arm.com> | |
To: | linux-arm-kernel-AT-lists.infradead.org | |
Subject: | [PATCH v2 00/24] arm64: FPSIMD/SVE/SME fixes + re-enable SME | |
Date: | Thu, 08 May 2025 14:26:20 +0100 | |
Message-ID: | <20250508132644.1395904-1-mark.rutland@arm.com> | |
Cc: | broonie-AT-kernel.org, catalin.marinas-AT-arm.com, daniel.kiss-AT-arm.com, david.spickett-AT-arm.com, luis.machado-AT-arm.com, mark.rutland-AT-arm.com, maz-AT-kernel.org, richard.sandiford-AT-arm.com, sander.desmalen-AT-arm.com, tabba-AT-google.com, tamas.petz-AT-arm.com, tkjos-AT-google.com, will-AT-kernel.org, yury.khrustalev-AT-arm.com | |
Archive-link: | Article |
Hi all, These patches fix a number of problems in the FPSIMD/SVE/SME code, and finally re-enable SME support. There are a few (mostly minor) ABI changes detailed in the patches. Notably the clone() ABI is changed due to an incompatiblity with the AAPCS64 ZA lazy saving scheme and the way this has been deployed in userspace. The full details of that are in patch 13. The series is based on the for-next/sme-fixes branch from the arm64 tree, and I've pushed the series to the 'arm64-fpsimd-fixes-20250508' tag of my kernel.org repo, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git https://git.kernel.org/pub/scm/linux/kernel/git/mark/linu... Since v1 [1]: * Split kselftest changes into separate patches * Add patch to clean up FPSIMD context restoration * Remove redundant read of TPIDR2 in copy_thread() * Fix sve/sme typo in change_live_vector_length() error handling * Add Acked-by and Reviewed-by tags * Fix a number of commit message typos * Clarify commit message for sve_set_common() error handling [1] https://lore.kernel.org/linux-arm-kernel/20250506152523.1... Mark. Mark Rutland (24): arm64/fpsimd: Do not discard modified SVE state arm64/fpsimd: signal: Clear PSTATE.SM when restoring FPSIMD frame only arm64/fpsimd: signal: Mandate SVE payload for streaming-mode state arm64/fpsimd: signal: Consistently read FPSIMD context arm64/fpsimd: ptrace: Consistently handle partial writes to NT_ARM_(S)SVE arm64/fpsimd: Clarify sve_sync_*() functions arm64/fpsimd: Factor out {sve,sme}_state_size() helpers arm64/fpsimd: Add task_smstop_sm() arm64/fpsimd: signal: Use SMSTOP behaviour in setup_return() arm64/fpsimd: Remove redundant task->mm check arm64/fpsimd: Consistently preserve FPSIMD state during clone() arm64/fpsimd: Clear PSTATE.SM during clone() arm64/fpsimd: Make clone() compatible with ZA lazy saving arm64/fpsimd: ptrace/prctl: Ensure VL changes do not resurrect stale data arm64/fpsimd: ptrace/prctl: Ensure VL changes leave task in a valid state arm64/fpsimd: ptrace: Save task state before generating SVE header arm64/fpsimd: ptrace: Do not present register data for inactive mode arm64/fpsimd: ptrace: Mandate SVE payload for streaming-mode state arm64/fpsimd: ptrace: Gracefully handle errors arm64/fpsimd: Allow CONFIG_ARM64_SME to be selected kselftest/arm64: fp-ptrace: Fix expected FPMR value when PSTATE.SM is changed kselftest/arm64: tpidr2: Adjust to new clone() behaviour kselftest/arm64: fp-ptrace: Adjust to new VL change behaviour kselftest/arm64: fp-ptrace: Adjust to new inactive mode behaviour Documentation/arch/arm64/sme.rst | 6 +- arch/arm64/Kconfig | 1 - arch/arm64/include/asm/fpsimd.h | 61 +++-- arch/arm64/kernel/entry-common.c | 46 +++- arch/arm64/kernel/fpsimd.c | 231 +++++++++---------- arch/arm64/kernel/process.c | 115 +++++---- arch/arm64/kernel/ptrace.c | 137 ++++++----- arch/arm64/kernel/signal.c | 91 ++++---- tools/testing/selftests/arm64/abi/tpidr2.c | 14 +- tools/testing/selftests/arm64/fp/fp-ptrace.c | 62 +++-- 10 files changed, 421 insertions(+), 343 deletions(-) -- 2.30.2