All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] target/riscv: Expose "priv" register for GDB
@ 2019-10-14 15:45 Jonathan Behrens
  2019-10-14 15:45   ` Jonathan Behrens
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Jonathan Behrens @ 2019-10-14 15:45 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv


This series adds a new "priv" virtual register that reports the current
privilege mode. This is helpful for debugging purposes because that information
is not actually available in any of the real CSRs.

The third patch in this series makes the priv virtual register writitable. I'm
not entirely sure this is a good idea, so I split it out into its own patch. In
particular, this change will conflict with the hypervisor extension work which
assumes that the privilege mode does not change in unexpected cases.

As pointed out in a previous version of this series, GDB actually contains some
support already for the accessing the privilege mode via a virtual "priv"
register, including to convert the values into human readable forms:

(gdb) info reg priv
priv           0x3      prv:3 [Machine]

Changlog V4:
- Fix typo in filename

Changlog V3:
- Break patch into series
- Make priv a virtual register

Changelog V2:
- Use PRV_H and PRV_S instead of integer literals

Jonathan Behrens (3)
  target/riscv: Tell gdbstub the correct number of CSRs
  target/riscv: Expose priv register for GDB for reads
  target/riscv: Make the priv register writable by GDB

 configure                       |  4 ++--
 gdb-xml/riscv-32bit-virtual.xml | 11 +++++++++++
 gdb-xml/riscv-64bit-virtual.xml | 11 +++++++++++
 target/riscv/gdbstub.c          | 36 ++++++++++++++++++++++++++++++++++--
 4 files changed, 58 insertions(+), 4 deletions(-)




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

end of thread, other threads:[~2019-10-18 18:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14 15:45 [PATCH v4 0/3] target/riscv: Expose "priv" register for GDB Jonathan Behrens
2019-10-14 15:45 ` [PATCH v4 1/3] target/riscv: Tell gdbstub the correct number of CSRs Jonathan Behrens
2019-10-14 15:45   ` Jonathan Behrens
2019-10-14 15:45 ` [PATCH v4 2/3] target/riscv: Expose "priv" register for GDB for reads Jonathan Behrens
2019-10-14 15:45   ` Jonathan Behrens
2019-10-14 18:00   ` Alistair Francis
2019-10-14 18:00     ` Alistair Francis
2019-10-15  8:38   ` Bin Meng
2019-10-15  8:38     ` Bin Meng
2019-10-14 15:45 ` [PATCH v4 3/3] target/riscv: Make the priv register writable by GDB Jonathan Behrens
2019-10-14 15:45   ` Jonathan Behrens
2019-10-18 18:35 ` [PATCH v4 0/3] target/riscv: Expose "priv" register for GDB Palmer Dabbelt
2019-10-18 18:35   ` Palmer Dabbelt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.