mbox series

[v2,00/13] arm64: Preparatory FPSIMD/SVE/SME fixes

Message ID 20250409164010.3480271-1-mark.rutland@arm.com (mailing list archive)
Headers show
Series arm64: Preparatory FPSIMD/SVE/SME fixes | expand

Message

Mark Rutland April 9, 2025, 4:39 p.m. UTC
Hi,

These patches fix a number of problems in the FPSIMD/SVE/SME code, as a
step towards re-enabling SME support. Additional fixes/changes will be
necessary before we can re-enable SME support. I intend to follow up
with more patches in the near future.

I'm hoping these patches as-is are largely uncontroversial, though I'm
afraid they've only seen light/targeted testing so far, so any testing
would be much appreciated.

The series is based on v6.15-rc1, and I've pushed the series to the
'arm64-fpsimd-fixes-20250409' branch of my kernel.org git repo:

  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]:
* Drop removal of redundant TIF_SVE clearing; this requires more preparatory work.
* Remove leftover prototype for fpsimd_force_sync_to_sve().
* Clarify commit message for opportunistic freeing of sve_state.
* Add Mark Brown's Reviewed-by tags.
  
[1] https://lore.kernel.org/linux-arm-kernel/20250404174435.3288106-1-mark.rutland@arm.com/

Mark.

Mark Brown (2):
  arm64/fpsimd: Discard stale CPU state when handling SME traps
  arm64/fpsimd: Don't corrupt FPMR when streaming mode changes

Mark Rutland (11):
  arm64/fpsimd: Avoid RES0 bits in the SME trap handler
  arm64/fpsimd: Remove unused fpsimd_force_sync_to_sve()
  arm64/fpsimd: Remove redundant SVE trap manipulation
  arm64/fpsimd: Remove opportunistic freeing of SME state
  arm64/fpsimd: Avoid clobbering kernel FPSIMD state with SMSTOP
  arm64/fpsimd: Reset FPMR upon exec()
  arm64/fpsimd: Fix merging of FPSIMD state during signal return
  arm64/fpsimd: Add fpsimd_save_and_flush_current_state()
  arm64/fpsimd: signal32: Always save+flush state early
  arm64/fpsimd: signal: Always save+flush state early
  arm64/fpsimd: signal: Simplify preserve_tpidr2_context()

 arch/arm64/include/asm/esr.h    | 14 ++---
 arch/arm64/include/asm/fpsimd.h |  3 +-
 arch/arm64/kernel/fpsimd.c      | 95 ++++++++++-----------------------
 arch/arm64/kernel/signal.c      | 71 +++++-------------------
 arch/arm64/kernel/signal32.c    | 11 ++--
 5 files changed, 59 insertions(+), 135 deletions(-)

Comments

Catalin Marinas April 9, 2025, 5:17 p.m. UTC | #1
On Wed, 09 Apr 2025 17:39:57 +0100, Mark Rutland wrote:
> These patches fix a number of problems in the FPSIMD/SVE/SME code, as a
> step towards re-enabling SME support. Additional fixes/changes will be
> necessary before we can re-enable SME support. I intend to follow up
> with more patches in the near future.
> 
> I'm hoping these patches as-is are largely uncontroversial, though I'm
> afraid they've only seen light/targeted testing so far, so any testing
> would be much appreciated.
> 
> [...]

I added these patches to for-next/sme-fixes (and for-kernelci) for wider
exposure. Not queued for upstream yet, I need to review and discuss with
Will whether we target 6.15 or 6.16.

Thanks!