Skip to content

target/riscv: Expose RV32 cpu to RV64 QEMU

LIU Zhiwei qemu-devel qemu-riscv 7 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. v7 Latest8 patches 5 repliesApplied
  2. v68 patches 8 repliesApplied
  3. v57 patches 6 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v47 patches3 repliesSuperseded
v37 patches6 repliesSuperseded
v27 patches2 repliesSuperseded
v16 patches8 repliesSuperseded

Changes in v7 from the cover letter

Remove cpu of "any".

Patches in v7 Applied

#Subject and filesSizeRepliesApplied
1/8target/riscv: Add fw_dynamic_info32 for booting RV32 OpenSBIhw/riscv/boot.c hw/riscv/sifive_u.c include/hw/riscv/boot.h +1 more+57 -140 replies
2/8target/riscv: Adjust PMP size for no-MMU RV64 QEMU running RV32target/riscv/pmp.c+1 -10 replies
3/8target/riscv: Correct SXL return value for RV32 in RV64 QEMUtarget/riscv/cpu.h+4 -10 replies
4/8target/riscv: Detect sxl to set bit width for RV32 in RV64target/riscv/cpu_helper.c+12 -50 replies
5/8target/riscv: Correct mcause/scause bit width for RV32 in RV64 QEMUtarget/riscv/cpu_helper.c+6 -20 replies
6/8target/riscv: Enable RV32 CPU support in RV64 QEMUconfigs/targets/riscv64-softmmu.mak target/riscv/cpu.c+14 -40 replies
7/8target/riscv: Add max32 CPU for RV64 QEMUtarget/riscv/cpu-qom.h target/riscv/cpu.c+8 -52 replies
8/8tests/avocado: Boot Linux for RV32 cpu on RV64 QEMUtests/avocado/tuxrun_baselines.py+16 -02 replies

Reviews trailers per patch

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

PatchLiu ZhiweiAlistair FrancisDaniel Henrique Barboza
1/8R-b R-b
2/8R-b R-b
3/8R-b R-b
4/8R-b R-b
5/8R-b R-b
6/8R-b R-b
7/8R-b R-b
8/8A-b R-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 3 reviewers.

Read the v7 thread

Cover letter [PATCH v7 0/8] target/riscv: Expose RV32 cpu to RV64 QEMU

From: TANG Tiancheng <[email protected]>

This patch set aims to expose 32-bit RISC-V cpu to RV64 QEMU. Thus qemu-system-riscv64 can directly boot a RV32 Linux.

This patch set has been tested with 6.9.0 Linux Image. And add an avocado tuxrun test in tests/avocado.

v7:
Remove cpu of "any".

v6:
Use TUXRUN test case instead of boot_linux_console Add any32 and max32 cpu for RV64 QEMU

v5:
Rebase to master and add tags

v4:
Drop UL completely in PATCH v3 2/7, 4/7, 5/7.
Avocado: Add "if=none" to "-drive" option in QEMU command line

v3:
Rebase to the master branch

v2:
Remove the line that was inadvertently left in PATCH v1 4/6. Add an avocado test.

v1:
https://mail.gnu.org/archive/html/qemu-riscv/2024-06/msg00501.html

LIU Zhiwei (2):
target/riscv: Add max32 CPU for RV64 QEMU tests/avocado: Boot Linux for RV32 cpu on RV64 QEMU

TANG Tiancheng (6):
target/riscv: Add fw_dynamic_info32 for booting RV32 OpenSBI target/riscv: Adjust PMP size for no-MMU RV64 QEMU running RV32 target/riscv: Correct SXL return value for RV32 in RV64 QEMU target/riscv: Detect sxl to set bit width for RV32 in RV64 target/riscv: Correct mcause/scause bit width for RV32 in RV64 QEMU target/riscv: Enable RV32 CPU support in RV64 QEMU

 configs/targets/riscv64-softmmu.mak |  2 +-
 hw/riscv/boot.c                     | 35 +++++++++++++++++++----------
 hw/riscv/sifive_u.c                 |  3 ++-
 include/hw/riscv/boot.h             |  4 +++-
 include/hw/riscv/boot_opensbi.h     | 29 ++++++++++++++++++++++++
 target/riscv/cpu-qom.h              |  1 +
 target/riscv/cpu.c                  | 28 ++++++++++++++++-------
 target/riscv/cpu.h                  |  5 ++++-
 target/riscv/cpu_helper.c           | 25 +++++++++++++++------
 target/riscv/pmp.c                  |  2 +-
 tests/avocado/tuxrun_baselines.py   | 16 +++++++++++++
 11 files changed, 118 insertions(+), 32 deletions(-)
Signature · 1 line
2.43.0