Skip to content

Introduce sdtrig ISA extension

Himanshu Chauhan qemu-devel qemu-riscv 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest4 patches 6 repliesIn review
  2. v63 patches 3 repliesSuperseded
  3. v53 patches 3 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v43 patches8 repliesSuperseded

Changes in v7 from the cover letter

- Cosmetic changes. All patches were run through checkpatch.pl. No errors/warning.
- Remove all debug || ext_sdtrig references. All decisions are based on debug flag alone
- Added null check before itimers are deleted. Without this check a crash is observed.

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4target/riscv: Check for valid itimer pointer before freetarget/riscv/debug.c+4 -11 reply
2/4target/riscv: Enable mcontrol6 triggers only when sdtrig is selectedtarget/riscv/cpu.c target/riscv/cpu_cfg.h target/riscv/debug.c+31 -52 replies
3/4target/riscv: Expose sdtrig ISA extensiontarget/riscv/cpu.c+2 -02 replies
4/4target/riscv: Enable sdtrig for Ventana's Veyron CPUstarget/riscv/cpu.c+1 -01 reply

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchAndrew JonesAlistair Francis
1/4R-b
2/4R-b R-b
3/4A-b
4/4

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

Read the v7 thread

Cover letter [PATCH v7 0/4] Introduce sdtrig ISA extension

All the CPUs may or may not implement the debug triggers. Some CPUs may implement only debug specification v0.13 and not sdtrig ISA extension.

This patchset, adds sdtrig ISA as an extension which can be turned on or off by sdtrig=<true/false> option. It is turned off by default.

When debug is true and sdtrig is false, the behaviour is as defined in debug specification v0.13. If sdtrig is turned on, the behaviour is as defined in the sdtrig ISA extension.

The "sdtrig" string is concatenated to ISA string when debug or sdtrig is enabled.

Changes from v1:
- Replaced the debug property with ext_sdtrig
- Marked it experimenatal by naming it x-sdtrig
- x-sdtrig is added to ISA string
- Reversed the patch order

Changes from v2:
- Mark debug property as deprecated and replace internally with sdtrig extension
- setting/unsetting debug property shows warning and sets/unsets ext_sdtrig
- sdtrig is added to ISA string as RISC-V debug specification is frozen

Changes from v3:
- debug propery is not deprecated but it is superceded by sdtrig extension
- Mcontrol6 support is not published when only debug property is turned on as debug spec v0.13 doesn't define mcontrol6 match triggers.
- Enabling sdtrig extension turns of debug property and a warning is printed. This doesn't break debug specification implemenation since sdtrig is backward compatible with debug specification.
- Disable debug property and enable sdtrig by default for Ventana's Veyron CPUs.

Changes from v4:
- Enable debug flag if sdtrig was enabled but debug was disabled.
- Other cosmetic changes.

Changes from v5:
- Addressed comments from Andrew Jones

Changes from v6:
- Cosmetic changes. All patches were run through checkpatch.pl. No errors/warning.
- Remove all debug || ext_sdtrig references. All decisions are based on debug flag alone
- Added null check before itimers are deleted. Without this check a crash is observed.

Himanshu Chauhan (4):
target/riscv: Check for valid itimer pointer before free target/riscv: Enable mcontrol6 triggers only when sdtrig is selected target/riscv: Expose sdtrig ISA extension
target/riscv: Enable sdtrig for Ventana's Veyron CPUs

 target/riscv/cpu.c     |  8 ++++++++
 target/riscv/cpu_cfg.h |  1 +
 target/riscv/debug.c   | 35 +++++++++++++++++++++++++++++------
 3 files changed, 38 insertions(+), 6 deletions(-)
Signature · 1 line
2.34.1