Skip to content

riscv: add initial sdext support

Daniel Henrique Barboza qemu-devel qemu-riscv 4 versions – Applied

Status from this message: Applied to riscv-to-apply.next with the comments on patch 2 fixed up

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest7 patches 3 repliesApplied
  2. v97 patches 12 repliesSuperseded
  3. v87 patches 1 replySuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v77 patches2 repliesSuperseded

Changes in v10 from the cover letter

- patch 1:
- change 'dcsr' field type from target_ulong to uint32_t.
- patch 2
- remove (target_ulong) cast when evaluating env->dcsr in

Patches in v10 Applied

#Subject and filesSizeRepliesApplied
1/7target/riscv: add sdext debug CSRs statetarget/riscv/cpu.c target/riscv/cpu.h target/riscv/cpu_bits.h +3 more+193 -01 reply
2/7target/riscv: add sdext Debug Mode helperstarget/riscv/cpu.h target/riscv/tcg/cpu_helper.c target/riscv/tcg/debug.c +1 more+110 -01 reply
3/7target/riscv: add dret instructiontarget/riscv/helper.h target/riscv/insn32.decode target/riscv/tcg/insn_trans/trans_privileged.c.inc +1 more+38 -00 replies
4/7target/riscv: add sdext enter Debug Mode on ebreaktarget/riscv/helper.h target/riscv/tcg/insn_trans/trans_privileged.c.inc target/riscv/tcg/op_helper.c+41 -00 replies
5/7target/riscv: add sdext single-step supportinclude/exec/translation-block.h target/riscv/cpu.h target/riscv/helper.h +4 more+49 -40 replies
6/7target/riscv: add sdtrig trigger action=debug modetarget/riscv/tcg/debug.c+52 -20 replies
7/7tests/tcg/riscv64: add sdext "not on Debug mode" sigill teststests/tcg/riscv64/system/meson.build tests/tcg/riscv64/test-sdext-sigill.S+91 -00 replies

Reviews trailers per patch

All 7 patches have a Reviewed-by or Acked-by.

PatchDaniel Henrique BarbozaTao TangAlistair FrancisNutty Liu
1/7R-b T-b A-b R-b
2/7R-b T-b R-b
3/7R-b T-b R-b R-b
4/7R-b T-b R-b R-b
5/7R-b T-b R-b R-b
6/7R-b T-b A-b
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v10 thread

Cover letter [PATCH v10 0/7] riscv: add initial sdext support

Hi,

In this version we have minor changes proposed during v8, in particular the 'dcsr' field being an uint32_t instead of a target_ulong given that the reg is always 32 bits.

No other changes made. Patches based on alistair/riscv-to-apply.next.

Changes from v9:
- patch 1:
- change 'dcsr' field type from target_ulong to uint32_t.
- patch 2
- remove (target_ulong) cast when evaluating env->dcsr in

    riscv_cpu_enter_debug_mode();

- move var declarations to the top of riscv_cpu_leave_debug_mode().
- patch 3:
- move 'retpc' var declaration up in helper_dret().
- v9 link: https://lore.kernel.org/qemu-devel/[email protected]/

Chao Liu (6):
target/riscv: add sdext debug CSRs state target/riscv: add sdext Debug Mode helpers target/riscv: add dret instruction target/riscv: add sdext enter Debug Mode on ebreak target/riscv: add sdext single-step support target/riscv: add sdtrig trigger action=debug mode

Daniel Henrique Barboza (1):
tests/tcg/riscv64: add sdext "not on Debug mode" sigill tests

 include/exec/translation-block.h              |   4 +-
 target/riscv/cpu.c                            |   7 +
 target/riscv/cpu.h                            |   9 ++
 target/riscv/cpu_bits.h                       |  33 +++++
 target/riscv/cpu_cfg_fields.h.inc             |   1 +
 target/riscv/helper.h                         |   3 +
 target/riscv/insn32.decode                    |   1 +
 target/riscv/machine.c                        |  22 +++
 target/riscv/tcg/cpu_helper.c                 |  94 +++++++++++++
 target/riscv/tcg/csr.c                        | 126 ++++++++++++++++++
 target/riscv/tcg/debug.c                      |  59 +++++++-
 .../tcg/insn_trans/trans_privileged.c.inc     |  24 ++++
 target/riscv/tcg/op_helper.c                  |  72 ++++++++++
 target/riscv/tcg/tcg-cpu.c                    |  19 +++
 target/riscv/tcg/translate.c                  |  15 ++-
 tests/tcg/riscv64/system/meson.build          |   8 ++
 tests/tcg/riscv64/test-sdext-sigill.S         |  83 ++++++++++++
 17 files changed, 574 insertions(+), 6 deletions(-)
 create mode 100644 tests/tcg/riscv64/test-sdext-sigill.S
Signature · 1 line
2.43.0