Skip to content

RISC-V: Allow specifying CPU ISA via command line

Alistair Francis qemu-devel qemu-riscv 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 16 repliesIn review
  2. v26 patches 2 repliesSuperseded
  3. v16 patches 2 repliesSuperseded

Changes in v3 from the cover letter

- Ensure a minimal length so we don't run off the end of the string.
- Don't parse the rv32/rv64 in the riscv_generate_cpu_init() loop

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6linux-user/riscv: Add the CPU type as a commentlinux-user/riscv/target_elf.h+1 -00 replies
2/6target/riscv: Fall back to generating a RISC-V CPUtarget/riscv/cpu.c target/riscv/cpu.h+102 -19 replies
3/6target/riscv: Create settable CPU propertiestarget/riscv/cpu.c target/riscv/cpu.h+56 -40 replies
4/6riscv: virt: Allow specifying a CPU via commandlinehw/riscv/virt.c+2 -11 reply
5/6target/riscv: Remove the generic no MMU CPUstarget/riscv/cpu.c target/riscv/cpu.h+0 -40 replies
6/6riscv: Add a generic spike machinehw/riscv/spike.c+105 -16 replies

Reviews trailers per patch

2 of 6 patches have a Reviewed-by or Acked-by.

PatchIgor Mammedov
1/6
2/6
3/6
4/6R-b
5/6
6/6A-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 [Qemu-devel] [PATCH for 4.1 v3 0/6] RISC-V: Allow specifying CPU ISA via command line

This patch series adds a generic RISC-V CPU that can be generated at run time based on the ISA string specified to QEMU via the -cpu argument. This is supported on the virt and spike boards allowing users to specify the

RISC-V extensions as well as the ISA version.
As part of the conversion we have deprecated the version specifi Spike machines.

v3:
- Ensure a minimal length so we don't run off the end of the string.
- Don't parse the rv32/rv64 in the riscv_generate_cpu_init() loop
v2:
- Keep the any CPU for linux-user

Alistair Francis (6):
linux-user/riscv: Add the CPU type as a comment target/riscv: Fall back to generating a RISC-V CPU target/riscv: Create settable CPU properties
riscv: virt: Allow specifying a CPU via commandline target/riscv: Remove the generic no MMU CPUs
riscv: Add a generic spike machine

 hw/riscv/spike.c              | 106 +++++++++++++++++++++++-
 hw/riscv/virt.c               |   3 +-
 linux-user/riscv/target_elf.h |   1 +
 target/riscv/cpu.c            | 147 +++++++++++++++++++++++++++++++++-
 target/riscv/cpu.h            |  12 ++-
 5 files changed, 262 insertions(+), 7 deletions(-)
Signature · 1 line
2.21.0