Skip to content

target/riscv: SATP mode and CPU definition overhaul

Paolo Bonzini qemu-devel 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest25 of 26 patches 21 repliesIn review
  2. v425 of 26 patches 6 repliesSuperseded
  3. v326 of 27 patches 26 repliesApplied
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v17 patches15 repliesSuperseded

25 of 26 patches are in this archive. The cover letter announces 26.

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/26target/riscv: assert argument to set_satp_mode_max_supported is validtarget/riscv/cpu.c+5 -10 replies
2/26target/riscv: cpu: store max SATP mode as a single integertarget/riscv/cpu.c target/riscv/cpu_cfg.h target/riscv/tcg/tcg-cpu.c+8 -70 replies
3/26target/riscv: update max_satp_mode based on QOM propertieshw/riscv/virt-acpi-build.c hw/riscv/virt.c target/riscv/cpu.c +2 more+24 -320 replies
4/26target/riscv: remove supported from RISCVSATPMaptarget/riscv/cpu.c target/riscv/cpu_cfg.h+25 -130 replies
6/26target/riscv: introduce RISCVCPUDeftarget/riscv/cpu.c target/riscv/cpu.h+22 -91 reply
7/26target/riscv: store RISCVCPUDef struct directly in the classhw/riscv/boot.c target/riscv/cpu.c target/riscv/cpu.h +5 more+39 -290 replies
8/26target/riscv: merge riscv_cpu_class_init with the class_base functiontarget/riscv/cpu.c+10 -110 replies
9/26target/riscv: move RISCVCPUConfig fields to a header filetarget/riscv/cpu_cfg.h target/riscv/cpu_cfg_fields.h.inc+173 -1600 replies
10/26target/riscv: include default value in cpu_cfg_fields.h.inctarget/riscv/cpu_cfg.h target/riscv/cpu_cfg_fields.h.inc+12 -121 reply
11/26target/riscv: add more RISCVCPUDef fieldstarget/riscv/cpu.c target/riscv/cpu.h target/riscv/kvm/kvm-cpu.c+51 -11 reply
12/26target/riscv: convert abstract CPU classes to RISCVCPUDeftarget/riscv/cpu.c target/riscv/cpu.h+46 -481 reply
13/26target/riscv: convert profile CPU models to RISCVCPUDeftarget/riscv/cpu.c target/riscv/cpu.h+48 -381 reply
14/26target/riscv: convert bare CPU models to RISCVCPUDeftarget/riscv/cpu.c+17 -411 reply
15/26target/riscv: convert dynamic CPU models to RISCVCPUDeftarget/riscv/cpu.c+31 -821 reply
16/26target/riscv: convert SiFive E CPU models to RISCVCPUDeftarget/riscv/cpu-qom.h target/riscv/cpu.c+21 -541 reply
17/26target/riscv: convert ibex CPU models to RISCVCPUDeftarget/riscv/cpu.c+16 -231 reply
18/26target/riscv: convert SiFive U models to RISCVCPUDeftarget/riscv/cpu-qom.h target/riscv/cpu.c+37 -431 reply
19/26target/riscv: th: make CSR insertion test a bit more intuitivetarget/riscv/th_csr.c+4 -91 reply
20/26target/riscv: generalize custom CSR functionalitytarget/riscv/cpu.c target/riscv/cpu.h target/riscv/csr.c +1 more+40 -231 reply
21/26target/riscv: convert TT C906 to RISCVCPUDeftarget/riscv/cpu.c+28 -331 reply
22/26target/riscv: convert TT Ascalon to RISCVCPUDeftarget/riscv/cpu.c+60 -671 reply
23/26target/riscv: convert Ventana V1 to RISCVCPUDeftarget/riscv/cpu.c+35 -401 reply
24/26target/riscv: convert Xiangshan Nanhu to RISCVCPUDeftarget/riscv/cpu.c+23 -571 reply
25/26target/riscv: remove .instance_post_inittarget/riscv/cpu.c+2 -63 replies
26/26qom: reverse order of instance_post_init callsinclude/qom/object.h qom/object.c+6 -50 replies

Reviews trailers per patch

All 25 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlistair FrancisPhilippe Mathieu-Daudé
SeriesR-b
1/26R-b
2/26R-b
3/26R-b
4/26R-b
6/26R-b
7/26R-b
8/26R-b
9/26R-b
10/26R-b
11/26R-b
12/26R-b
13/26R-b
14/26R-b
15/26R-b
16/26R-b
17/26R-b
18/26R-b
19/26R-b
20/26R-b
21/26R-b
22/26R-b
23/26R-b
24/26R-b
25/26R-b
26/26R-b

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

Read the v5 thread

Cover letter [PATCH v5 00/26] target/riscv: SATP mode and CPU definition overhaul

Same as v4, with suggestion from Richard to avoid parentheses---which also fixes the issue with kvm-cpu.c reported by Daniel Barboza. KVM/RISC-V is now covered in CI and passes with this version.

Paolo

Paolo Bonzini (26):
target/riscv: assert argument to set_satp_mode_max_supported is valid target/riscv: cpu: store max SATP mode as a single integer target/riscv: update max_satp_mode based on QOM properties target/riscv: remove supported from RISCVSATPMap target/riscv: move satp_mode.{map,init} out of CPUConfig target/riscv: introduce RISCVCPUDef
target/riscv: store RISCVCPUDef struct directly in the class target/riscv: merge riscv_cpu_class_init with the class_base function target/riscv: move RISCVCPUConfig fields to a header file target/riscv: include default value in cpu_cfg_fields.h.inc target/riscv: add more RISCVCPUDef fields
target/riscv: convert abstract CPU classes to RISCVCPUDef target/riscv: convert profile CPU models to RISCVCPUDef target/riscv: convert bare CPU models to RISCVCPUDef target/riscv: convert dynamic CPU models to RISCVCPUDef target/riscv: convert SiFive E CPU models to RISCVCPUDef target/riscv: convert ibex CPU models to RISCVCPUDef target/riscv: convert SiFive U models to RISCVCPUDef target/riscv: th: make CSR insertion test a bit more intuitive target/riscv: generalize custom CSR functionality target/riscv: convert TT C906 to RISCVCPUDef
target/riscv: convert TT Ascalon to RISCVCPUDef target/riscv: convert Ventana V1 to RISCVCPUDef target/riscv: convert Xiangshan Nanhu to RISCVCPUDef target/riscv: remove .instance_post_init
qom: reverse order of instance_post_init calls

 include/qom/object.h              |    3 +-
 target/riscv/cpu-qom.h            |    2 +
 target/riscv/cpu.h                |   42 +-
 target/riscv/cpu_cfg.h            |  178 +----
 target/riscv/cpu_cfg_fields.h.inc |  170 +++++
 hw/riscv/boot.c                   |    2 +-
 hw/riscv/virt-acpi-build.c        |   14 +-
 hw/riscv/virt.c                   |    5 +-
 qom/object.c                      |    8 +-
 target/riscv/cpu.c                | 1014 +++++++++++++----------------
 target/riscv/csr.c                |   11 +-
 target/riscv/gdbstub.c            |    6 +-
 target/riscv/kvm/kvm-cpu.c        |   27 +-
 target/riscv/machine.c            |    2 +-
 target/riscv/tcg/tcg-cpu.c        |   13 +-
 target/riscv/th_csr.c             |   30 +-
 target/riscv/translate.c          |    2 +-
 17 files changed, 734 insertions(+), 795 deletions(-)
 create mode 100644 target/riscv/cpu_cfg_fields.h.inc
Signature · 1 line
2.49.0