Skip to content

RISC-V: Steps towards running 32-bit guests on

Alistair Francis qemu-devel qemu-riscv 3 versions – Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest10 patches 7 repliesApplied
  2. v29 patches 11 repliesSuperseded
  3. v18 patches 15 repliesSuperseded

Changes in v3 from the cover letter

- Remove casts from the decoder
- Add a patch to fix a comment
- Rebase on the RISC-V tree

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/10target/riscv: Remove the hardcoded RVXLEN macrotarget/riscv/cpu.c target/riscv/cpu.h+5 -70 replies
2/10target/riscv: Remove the hardcoded SSTATUS_SD macrotarget/riscv/cpu_bits.h target/riscv/csr.c+8 -70 replies
3/10target/riscv: Remove the hardcoded HGATP_MODE macrotarget/riscv/cpu_bits.h target/riscv/cpu_helper.c+15 -200 replies
4/10target/riscv: Remove the hardcoded MSTATUS_SD macrotarget/riscv/cpu_bits.h target/riscv/csr.c target/riscv/translate.c+27 -140 replies
5/10target/riscv: Remove the hardcoded SATP_MODE macrotarget/riscv/cpu_bits.h target/riscv/cpu_helper.c target/riscv/csr.c +1 more+56 -280 replies
6/10target/riscv: Remove the unused HSTATUS_WPRI macrotarget/riscv/cpu_bits.h+0 -60 replies
7/10target/riscv: Remove an unused CASE_OP_32_64 macrotarget/riscv/translate.c+0 -60 replies
8/10target/riscv: Consolidate RV32/64 32-bit instructionstarget/riscv/fpu_helper.c target/riscv/helper.h target/riscv/insn32-64.decode +11 more+166 -1524 replies
9/10target/riscv: Consolidate RV32/64 16-bit instructionstarget/riscv/insn16-32.decode target/riscv/insn16-64.decode target/riscv/insn16.decode +2 more+39 -720 replies
10/10target/riscv: Fix the RV64H decode commenttarget/riscv/insn32.decode+1 -12 replies

Reviews trailers per patch

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

PatchRichard HendersonBin Meng
1/10R-b R-b
2/10R-b R-b
3/10R-b R-b
4/10R-b
5/10R-b
6/10R-b R-b
7/10R-b R-b
8/10R-b
9/10R-b
10/10R-b

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

Read the v3 thread

Cover letter [PATCH v3 00/10] RISC-V: Steps towards running 32-bit guests on

This is another step towards running 32-bit CPU code on the 64-bit softmmu builds for RISC-V.

I have tested this and am able to run some 32-bit code, but eventually hit some issue. This series doesn't allow users to use 32-bit CPUs with 64-bit softmmu builds as it doesn't work yet. This series instead just gets us a little closer to being able to and removes more hardcoded macros so hopefully others also stop using them for new code.

v3:
- Remove casts from the decoder
- Add a patch to fix a comment
- Rebase on the RISC-V tree
v2:
- Update the decode tree setup
- Address other review comments

Alistair Francis (10):
target/riscv: Remove the hardcoded RVXLEN macro target/riscv: Remove the hardcoded SSTATUS_SD macro target/riscv: Remove the hardcoded HGATP_MODE macro target/riscv: Remove the hardcoded MSTATUS_SD macro target/riscv: Remove the hardcoded SATP_MODE macro target/riscv: Remove the unused HSTATUS_WPRI macro target/riscv: Remove an unused CASE_OP_32_64 macro target/riscv: Consolidate RV32/64 32-bit instructions target/riscv: Consolidate RV32/64 16-bit instructions target/riscv: Fix the RV64H decode comment

 target/riscv/cpu.h                      |  6 --
 target/riscv/cpu_bits.h                 | 44 -------------
 target/riscv/helper.h                   | 18 +++--
 target/riscv/insn16-32.decode           | 28 --------
 target/riscv/insn16-64.decode           | 36 ----------
 target/riscv/insn16.decode              | 30 +++++++++
 target/riscv/insn32-64.decode           | 88 -------------------------
 target/riscv/insn32.decode              | 67 ++++++++++++++++++-
 target/riscv/cpu.c                      |  6 +-
 target/riscv/cpu_helper.c               | 48 ++++++++++----
 target/riscv/csr.c                      | 40 +++++++++--
 target/riscv/fpu_helper.c               | 16 ++---
 target/riscv/monitor.c                  | 22 +++++--
 target/riscv/translate.c                | 32 +++++----
 target/riscv/vector_helper.c            |  4 --
 target/riscv/insn_trans/trans_rva.c.inc | 14 +++-
 target/riscv/insn_trans/trans_rvd.c.inc | 17 ++++-
 target/riscv/insn_trans/trans_rvf.c.inc |  6 +-
 target/riscv/insn_trans/trans_rvh.c.inc |  8 ++-
 target/riscv/insn_trans/trans_rvi.c.inc | 22 +++++--
 target/riscv/insn_trans/trans_rvm.c.inc | 12 +++-
 target/riscv/insn_trans/trans_rvv.c.inc | 39 +++++------
 target/riscv/meson.build                | 13 ++--
 23 files changed, 310 insertions(+), 306 deletions(-)
 delete mode 100644 target/riscv/insn16-32.decode
 delete mode 100644 target/riscv/insn16-64.decode
 delete mode 100644 target/riscv/insn32-64.decode
Signature · 1 line
2.31.1