Skip to content

RFC target/riscv/debug: Sdtrig fixes and TT Ascalon support

Nicholas Piggin qemu-devel qemu-riscv 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest25 patches 24 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/25target/riscv/debug: Check only mcontrol triggers for break/watchpoint matchingtarget/riscv/debug.c+18 -42 replies
2/25target/riscv/debug: Handle changing trigger typestarget/riscv/debug.c+33 -311 reply
3/25target/riscv/debug: Implement permissive type unavailable triggertarget/riscv/debug.c+29 -12 replies
4/25target/riscv/debug: Fix icount trigger privilege checktarget/riscv/debug.c+37 -452 replies
5/25target/riscv/debug: Update itrigger_enabled after changing privilegetarget/riscv/cpu_helper.c target/riscv/debug.c target/riscv/debug.h+17 -01 reply
6/25target/riscv/debug: Implement get_trigger_action for icount type triggertarget/riscv/debug.c+2 -01 reply
7/25target/riscv/debug: Fix migration post_load icount_enabled() testtarget/riscv/machine.c+1 -11 reply
8/25target/riscv/debug: Fix icount privilege matching icount_enabled() testtarget/riscv/debug.c+1 -11 reply
9/25target/riscv/debug: Implement icount trigger textra matchingtarget/riscv/debug.c+2 -11 reply
10/25target/riscv/debug: Maintain itrigger_enabled in helper_itrigger_match()target/riscv/debug.c+12 -11 reply
11/25target/riscv/debug: Fix breakpoint matching actiontarget/riscv/debug.c+23 -121 reply
12/25target/riscv/debug: Put mcontrol load/store match address into tvaltarget/riscv/debug.c+2 -01 reply
13/25target/riscv/debug: Remove breakpoints on resettarget/riscv/debug.c+13 -21 reply
14/25target/riscv/debug: Move debug CPU post_load details into debug.ctarget/riscv/debug.c target/riscv/debug.h target/riscv/machine.c+10 -51 reply
15/25target/riscv/debug: Insert breakpoints after migrationtarget/riscv/debug.c+14 -01 reply
16/25target/riscv/debug: Remove itrigger icount-enabled modetarget/riscv/cpu.c target/riscv/cpu.h target/riscv/cpu_helper.c +3 more+5 -1260 replies
17/25target/riscv/debug: Advertise icount trigger type in tinfotarget/riscv/debug.c+2 -01 reply
18/25target/riscv/debug: Reset trigger type to unavailabletarget/riscv/debug.c+2 -151 reply
19/25target/riscv/debug: Add new debug state formattarget/riscv/cpu.h target/riscv/csr.c target/riscv/debug.c +3 more+157 -890 replies
20/25target/riscv/debug: Migrate mcontext using new sdtrig vmstatetarget/riscv/machine.c+57 -10 replies
21/25target/riscv/debug: Implementation specific Sdtrig configurationtarget/riscv/cpu.c target/riscv/cpu.h target/riscv/debug.c +2 more+45 -40 replies
22/25target/riscv/debug: Support heterogeneous trigger typestarget/riscv/cpu.c target/riscv/debug.c target/riscv/debug.h+26 -40 replies
23/25target/riscv/debug: Support heterogeneous mcontrol access typestarget/riscv/cpu.c target/riscv/debug.c target/riscv/debug.h+22 -60 replies
24/25target/riscv/debug: Emulate TT Ascalon Sdtrigtarget/riscv/cpu.c+25 -00 replies
25/25target/riscv/debug: Fix minor comment typostarget/riscv/debug.c+2 -21 reply

Reviews trailers per patch

17 of 25 patches have a Reviewed-by or Acked-by.

PatchDaniel Henrique BarbozaChao Liu
1/25R-b R-b
2/25R-b
3/25R-b R-b
4/25R-b
5/25
6/25R-b
7/25R-b
8/25R-b
9/25R-b
10/25R-b
11/25R-b
12/25R-b
13/25R-b
14/25R-b
15/25R-b
16/25
17/25R-b
18/25R-b
19/25
20/25
21/25
22/25
23/25
24/25
25/25R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 00/25] target/riscv/debug: Sdtrig fixes and TT Ascalon support

Hi,

Sorry for the big series. The Ascalon CPU implements Sdtrig with 2 different types of mcontrol6 trigger and the icount trigger, so in the course of testing and bringing up OpenSBI and Linux support for this, I've accumulated quite a lot.

My new year resolution is to start being better upstream contributor, it's taken me a while with changing jobs and architectures. So I don't expect others to drop everything to review this! Joel has been prodding me, and noted there is some other Sdtrig work going on with the v1.0 support patches.

I think the debug v1.0 patches are somewhat orthogonal to this series, but both are addressing aspects of a common problem of Sdtrig implementation specifics. I wonder if these should be reconciled or left separate. Sdtrig v1.00/v0.13 configuration is a single boolean which is feasible as a CPU property. Whereas the entire space of Sdtrig implementation seems like too much to make configurable in that way.

Any thoughts would be welcome.

Thanks,
Nick

Nicholas Piggin (25):
target/riscv/debug: Check only mcontrol triggers for break/watchpoint
matching
target/riscv/debug: Handle changing trigger types target/riscv/debug: Implement permissive type unavailable trigger target/riscv/debug: Fix icount trigger privilege check target/riscv/debug: Update itrigger_enabled after changing privilege target/riscv/debug: Implement get_trigger_action for icount type
trigger
target/riscv/debug: Fix migration post_load icount_enabled() test target/riscv/debug: Fix icount privilege matching icount_enabled()
test
target/riscv/debug: Implement icount trigger textra matching target/riscv/debug: Maintain itrigger_enabled in
helper_itrigger_match()
target/riscv/debug: Fix breakpoint matching action target/riscv/debug: Put mcontrol load/store match address into tval target/riscv/debug: Remove breakpoints on reset target/riscv/debug: Move debug CPU post_load details into debug.c target/riscv/debug: Insert breakpoints after migration target/riscv/debug: Remove itrigger icount-enabled mode target/riscv/debug: Advertise icount trigger type in tinfo target/riscv/debug: Reset trigger type to unavailable target/riscv/debug: Add new debug state format target/riscv/debug: Migrate mcontext using new sdtrig vmstate target/riscv/debug: Implementation specific Sdtrig configuration target/riscv/debug: Support heterogeneous trigger types target/riscv/debug: Support heterogeneous mcontrol access types target/riscv/debug: Emulate TT Ascalon Sdtrig target/riscv/debug: Fix minor comment typos

 target/riscv/cpu.c         |  65 ++++-
 target/riscv/cpu.h         |  41 ++-
 target/riscv/cpu_helper.c  |  10 +-
 target/riscv/csr.c         |   7 +-
 target/riscv/debug.c       | 571 ++++++++++++++++++++-----------------
 target/riscv/debug.h       |  19 +-
 target/riscv/machine.c     |  96 ++++++-
 target/riscv/tcg/tcg-cpu.c |   5 +-
 8 files changed, 510 insertions(+), 304 deletions(-)
Signature · 1 line
2.51.0