qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] target/riscv: throw debug exception before page fault
@ 2025-01-20 20:49 Daniel Henrique Barboza
  2025-01-20 20:49 ` [PATCH v2 1/2] target/riscv/debug.c: use wp size = 4 for 32-bit CPUs Daniel Henrique Barboza
  2025-01-20 20:49 ` [PATCH v2 2/2] target/riscv: throw debug exception before page fault Daniel Henrique Barboza
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Henrique Barboza @ 2025-01-20 20:49 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-riscv, alistair.francis, bmeng, liwei1518, zhiwei_liu,
	palmer, richard.henderson, Daniel Henrique Barboza

Hi,

This second version implements the change Richard suggested in v1, i.e.
do not search for wps twice.

To do that we need to make an assumption that a watchpoint for a 64 bit
address will have size 8, in particular when the user does not set a
watchpoint size. To be consistent we also need to consider that 32 bit
CPUs would use watchpoints of size 4, which is something we're not
considering.  Patch 1 was added to make things more consistent in this
regard.

Patches based on master.

Changes from v1:
- patch 1 (new):
  - add watchpoints of size 4 when dealing with 32 bit addresses
- patch 2:
  - instead of looking for watchpoints twice, call
    cpu_check_watchpoint() and rely on fall-through in case no
    watchpoints are found
- v1 link: https://mail.gnu.org/archive/html/qemu-devel/2025-01/msg03575.html

Daniel Henrique Barboza (2):
  target/riscv/debug.c: use wp size = 4 for 32-bit CPUs
  target/riscv: throw debug exception before page fault

 target/riscv/cpu_helper.c | 19 +++++++++++++++++++
 target/riscv/debug.c      |  6 ++++--
 2 files changed, 23 insertions(+), 2 deletions(-)

-- 
2.47.1



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

end of thread, other threads:[~2025-01-21 19:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-20 20:49 [PATCH v2 0/2] target/riscv: throw debug exception before page fault Daniel Henrique Barboza
2025-01-20 20:49 ` [PATCH v2 1/2] target/riscv/debug.c: use wp size = 4 for 32-bit CPUs Daniel Henrique Barboza
2025-01-21 17:40   ` Philippe Mathieu-Daudé
2025-01-21 18:47     ` Daniel Henrique Barboza
2025-01-21 19:05       ` Philippe Mathieu-Daudé
2025-01-20 20:49 ` [PATCH v2 2/2] target/riscv: throw debug exception before page fault Daniel Henrique Barboza
2025-01-21 15:47   ` Richard Henderson
2025-01-21 16:43     ` Daniel Henrique Barboza

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).