mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/4] riscv: optimize Vector context restore on syscall
@ 2026-05-21 16:25 Andy Chiu
  2026-05-21 19:15 ` Olof Johansson
  0 siblings, 1 reply; 5+ messages in thread
From: Andy Chiu @ 2026-05-21 16:25 UTC (permalink / raw)
  To: Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti, linux-riscv
  Cc: Andy Chiu, dfustini, bjorn, greentime.hu, vincent.chen, linux-kernel

This patch series optimizes riscv vector state handling across syscall
boundaries and context switches. The kernel now keeps track of the
INITIAL state in sstatus.vs to optimize unnecessary context management
operations.

This version merges daichengrong's RFC patch [1] for the state tracking
code as it looks cleaner than my v2/v1.

[1]: https://lore.kernel.org/linux-riscv/7ba2f4b7-8475-4ec3-ab31-58b332bda47e@iscas.ac.cn/#r
Link to v2: https://lore.kernel.org/linux-riscv/20260402043414.2421916-1-andybnac@gmail.com/

Patch summary:
 - Updated patches: 2
 - New patches: 1, 3, 4

Changelog v3:
 - Refactor function names. (1, 2)
 - Merge daichengrong's patch, with a fix and optimzation. (2)
 - Fix ptrace GETREGSET failure. (3)
 - Strengthen ptrace SETREGSET semantics and add a test to cover it. (3,
   4)
 - Fix a potential ABI break in signal and add a test to prevent future
   breaks. (3, 4)

Changelog v2: rebase on top of for-next

Andy Chiu (3):
  riscv: vector: refactor vector context operations
  riscv: vector: adjust ptrace and signal behavior for INITIAL state
  selftests: riscv: Extend vector tests for sigreturn and ptrace

daichengrong (1):
  riscv: clarify vector state semantics on syscall and context switch

 arch/riscv/include/asm/kvm_vcpu_vector.h      |   8 +-
 arch/riscv/include/asm/vector.h               |  45 ++++----
 arch/riscv/kernel/kernel_mode_vector.c        |  27 ++++-
 arch/riscv/kernel/ptrace.c                    |  13 +--
 arch/riscv/kernel/signal.c                    |  11 +-
 arch/riscv/kernel/vector.c                    |  38 ++++++-
 arch/riscv/kvm/vcpu_vector.c                  |   8 +-
 .../selftests/riscv/sigreturn/sigreturn.c     |  75 +++++++++++++
 .../selftests/riscv/vector/vstate_ptrace.c    | 100 +++++++++++++++++-
 9 files changed, 281 insertions(+), 44 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-05-28 19:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-21 16:25 [PATCH v3 0/4] riscv: optimize Vector context restore on syscall Andy Chiu
2026-05-21 19:15 ` Olof Johansson
2026-05-21 21:09   ` Andy Chiu
2026-05-22  3:30     ` Olof Johansson
2026-05-28 19:09       ` [PATCH v4 " Andy Chiu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®