linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/24] arm64: FPSIMD/SVE/SME fixes + re-enable SME
@ 2025-05-08 13:26 Mark Rutland
  2025-05-08 13:26 ` [PATCH v2 01/24] arm64/fpsimd: Do not discard modified SVE state Mark Rutland
                   ` (24 more replies)
  0 siblings, 25 replies; 28+ messages in thread
From: Mark Rutland @ 2025-05-08 13:26 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: broonie, catalin.marinas, daniel.kiss, david.spickett,
	luis.machado, mark.rutland, maz, richard.sandiford,
	sander.desmalen, tabba, tamas.petz, tkjos, will, yury.khrustalev

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/linux.git/

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.1107431-1-mark.rutland@arm.com/

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



^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-05-08 16:01 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08 13:26 [PATCH v2 00/24] arm64: FPSIMD/SVE/SME fixes + re-enable SME Mark Rutland
2025-05-08 13:26 ` [PATCH v2 01/24] arm64/fpsimd: Do not discard modified SVE state Mark Rutland
2025-05-08 15:02   ` Will Deacon
2025-05-08 13:26 ` [PATCH v2 02/24] arm64/fpsimd: signal: Clear PSTATE.SM when restoring FPSIMD frame only Mark Rutland
2025-05-08 13:26 ` [PATCH v2 03/24] arm64/fpsimd: signal: Mandate SVE payload for streaming-mode state Mark Rutland
2025-05-08 13:26 ` [PATCH v2 04/24] arm64/fpsimd: signal: Consistently read FPSIMD context Mark Rutland
2025-05-08 14:34   ` Will Deacon
2025-05-08 13:26 ` [PATCH v2 05/24] arm64/fpsimd: ptrace: Consistently handle partial writes to NT_ARM_(S)SVE Mark Rutland
2025-05-08 13:26 ` [PATCH v2 06/24] arm64/fpsimd: Clarify sve_sync_*() functions Mark Rutland
2025-05-08 13:26 ` [PATCH v2 07/24] arm64/fpsimd: Factor out {sve,sme}_state_size() helpers Mark Rutland
2025-05-08 13:26 ` [PATCH v2 08/24] arm64/fpsimd: Add task_smstop_sm() Mark Rutland
2025-05-08 13:26 ` [PATCH v2 09/24] arm64/fpsimd: signal: Use SMSTOP behaviour in setup_return() Mark Rutland
2025-05-08 13:26 ` [PATCH v2 10/24] arm64/fpsimd: Remove redundant task->mm check Mark Rutland
2025-05-08 13:26 ` [PATCH v2 11/24] arm64/fpsimd: Consistently preserve FPSIMD state during clone() Mark Rutland
2025-05-08 13:26 ` [PATCH v2 12/24] arm64/fpsimd: Clear PSTATE.SM " Mark Rutland
2025-05-08 13:26 ` [PATCH v2 13/24] arm64/fpsimd: Make clone() compatible with ZA lazy saving Mark Rutland
2025-05-08 13:26 ` [PATCH v2 14/24] arm64/fpsimd: ptrace/prctl: Ensure VL changes do not resurrect stale data Mark Rutland
2025-05-08 13:26 ` [PATCH v2 15/24] arm64/fpsimd: ptrace/prctl: Ensure VL changes leave task in a valid state Mark Rutland
2025-05-08 13:26 ` [PATCH v2 16/24] arm64/fpsimd: ptrace: Save task state before generating SVE header Mark Rutland
2025-05-08 13:26 ` [PATCH v2 17/24] arm64/fpsimd: ptrace: Do not present register data for inactive mode Mark Rutland
2025-05-08 13:26 ` [PATCH v2 18/24] arm64/fpsimd: ptrace: Mandate SVE payload for streaming-mode state Mark Rutland
2025-05-08 13:26 ` [PATCH v2 19/24] arm64/fpsimd: ptrace: Gracefully handle errors Mark Rutland
2025-05-08 13:26 ` [PATCH v2 20/24] arm64/fpsimd: Allow CONFIG_ARM64_SME to be selected Mark Rutland
2025-05-08 13:26 ` [PATCH v2 21/24] kselftest/arm64: fp-ptrace: Fix expected FPMR value when PSTATE.SM is changed Mark Rutland
2025-05-08 13:26 ` [PATCH v2 22/24] kselftest/arm64: tpidr2: Adjust to new clone() behaviour Mark Rutland
2025-05-08 13:26 ` [PATCH v2 23/24] kselftest/arm64: fp-ptrace: Adjust to new VL change behaviour Mark Rutland
2025-05-08 13:26 ` [PATCH v2 24/24] kselftest/arm64: fp-ptrace: Adjust to new inactive mode behaviour Mark Rutland
2025-05-08 15:02 ` [PATCH v2 00/24] arm64: FPSIMD/SVE/SME fixes + re-enable SME Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).