public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [v1, 0/3] riscv: fix ptrace and export VLENB
@ 2023-08-16 15:54 Andy Chiu
  2023-08-16 15:54 ` [v1, 1/3] RISC-V: Remove ptrace support for vectors Andy Chiu
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Andy Chiu @ 2023-08-16 15:54 UTC (permalink / raw)
  To: linux-riscv, palmer
  Cc: greentime.hu, guoren, bjorn, conor.dooley, Andy Chiu,
	Paul Walmsley, Albert Ou

We add a vlenb field in Vector context and save it with the
riscv_vstate_save() macro. It should not cause performance regression as
VLENB is a design-time constant and is frequently used by hardware.
Also, adding this field into the __sc_riscv_v_state may benifit us on a
future compatibility issue becuse a hardware may have writable VLENB.

Adding and saving VLENB have an immediate benifit as it gives ptrace a
better view of the Vector extension and makes it possible to reconstruct
Vector register files from the dump without doing an additional csr read.

This patchset also sync the number of note types between us and gdb for
riscv to solve a conflicting note.

This is not an ABI break given that 6.5 has not been released yet.

The series is tested on a virt QEMU by verifying VLENB is saved in
ptrace, coredump, and signal stack.

[1] https://sourceware.org/pipermail/gdb-patches/2023-August/201492.html

Andy Chiu (2):
  RISC-V: vector: export VLENB csr in __sc_riscv_v_state
  RISC-V: Add ptrace support for vectors

Palmer Dabbelt (1):
  RISC-V: Remove ptrace support for vectors

 arch/riscv/include/asm/vector.h      | 3 ++-
 arch/riscv/include/uapi/asm/ptrace.h | 1 +
 include/uapi/linux/elf.h             | 3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

-- 
2.17.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

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

end of thread, other threads:[~2023-08-24 20:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-16 15:54 [v1, 0/3] riscv: fix ptrace and export VLENB Andy Chiu
2023-08-16 15:54 ` [v1, 1/3] RISC-V: Remove ptrace support for vectors Andy Chiu
2023-08-16 15:54 ` [v1, 2/3] RISC-V: vector: export VLENB csr in __sc_riscv_v_state Andy Chiu
2023-08-17 12:35   ` Maciej W. Rozycki
2023-08-22 18:01     ` Andy Chiu
2023-08-22 22:39       ` Maciej W. Rozycki
2023-08-16 15:54 ` [v1, 3/3] RISC-V: Add ptrace support for vectors Andy Chiu
2023-08-17 12:35 ` [v1, 0/3] riscv: fix ptrace and export VLENB Maciej W. Rozycki
2023-08-23 19:40 ` patchwork-bot+linux-riscv
2023-08-24 20:08 ` (subset) " Palmer Dabbelt

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