All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/18] single-binary: target/riscv, compile subset of compilation units once
@ 2026-10-01 15:59 ` Anton Johansson via
  0 siblings, 0 replies; 73+ messages in thread
From: Anton Johansson via qemu development @ 2026-10-01 15:59 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anton Johansson, qemu-riscv, daniel.barboza, philmd,
	pierrick.bouvier, palmer, alistair.francis

All compilation units which do not pull in helper definitions are
compiled once for system mode by widening target_ulong to
uint64_t.

This series is motivated by the fact that riscv64 already handles
XLEN == 32 as a subset of the 64-bit ISA.  As such we can reduce
duplicate compilation units by moving towards riscv64 as default.

If anyone more familiar with riscv is aware of differences between XLEN
== 32 on riscv64 vs riscv32, please do let me know. No behaviour change
is intended compared to riscv32.

Based on: 20260916-hw-riscv-cpu-int-v4-0-babc367b60f5@rev.ng

Signed-off-by: Anton Johansson <anjo@rev.ng>
---
Anton Johansson (18):
      target/riscv: Make internals.h target agnostic
      target/riscv: meson, add user and common system source sets
      target/riscv: Move pmu CSR read to csr.h
      target/riscv: Make debug.c target agnostic
      target/riscv: Widen CSR ops to 64-bit and compile once for system-mode
      target/riscv: Runtime CPU registration
      target/riscv: Runtime register MAX and BARE CPUs
      target/riscv: cpu.c unconditionally check larger MXL
      target/riscv: Stub KVM functions for machines.c/cpu.c
      target/riscv: Compile cpu.c once for system-mode
      target/riscv: Compile cpu_helper.c once for system-mode
      target/riscv: Compile tcg-cpu.c once for system-mode
      target/riscv: Compile riscv-qmp-cmds.c once
      target/riscv: Compile pmp.c once
      target/riscv: Compile arch_dump.c once
      target/riscv: Compile machine.c once
      target/riscv: Compile time_helper.c once
      target/riscv: Compile monitor.c once

 target/riscv/cpu.h                  |   1 +
 target/riscv/internals.h            |  31 +-
 target/riscv/tcg/csr.h              |  37 +-
 target/riscv/tcg/debug.h            |  11 +-
 target/riscv/tcg/pmu.h              |   3 -
 target/riscv/tcg/vector_internals.h |   5 +-
 target/riscv/arch_dump.c            |  13 +-
 target/riscv/cpu.c                  | 259 ++++++++-----
 target/riscv/gdbstub.c              |   2 +-
 target/riscv/kvm/kvm-stub.c         |  21 +
 target/riscv/machine.c              |  10 +-
 target/riscv/monitor.c              |  45 +--
 target/riscv/tcg/cpu_helper.c       |  79 ++--
 target/riscv/tcg/csr.c              | 736 ++++++++++++++++++------------------
 target/riscv/tcg/debug.c            | 150 ++++----
 target/riscv/tcg/mips_csr.c         |  12 +-
 target/riscv/tcg/op_helper.c        |   6 +-
 target/riscv/tcg/pmp.c              |  19 +-
 target/riscv/tcg/pmu.c              |   9 +-
 target/riscv/tcg/tcg-cpu.c          |   8 +-
 target/riscv/tcg/th_csr.c           |   6 +-
 target/riscv/tcg/vector_helper.c    |  64 ++--
 target/riscv/meson.build            |  18 +-
 target/riscv/tcg/meson.build        |  21 +-
 24 files changed, 826 insertions(+), 740 deletions(-)



^ permalink raw reply	[flat|nested] 73+ messages in thread

end of thread, other threads:[~2026-10-07  9:26 UTC | newest]

Thread overview: 73+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-01 15:59 [PATCH 00/18] single-binary: target/riscv, compile subset of compilation units once Anton Johansson via qemu development
2026-10-01 15:59 ` Anton Johansson via
2026-10-01 15:59 ` [PATCH 01/18] target/riscv: Make internals.h target agnostic Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 21:25   ` Pierrick Bouvier
2026-10-01 21:33     ` Pierrick Bouvier
2026-10-06 23:14     ` Anton Johansson via qemu development
2026-10-06 23:14       ` Anton Johansson via
2026-10-07  0:26       ` Pierrick Bouvier
2026-10-02  5:56   ` Philippe Mathieu-Daudé
2026-10-02  6:06   ` Yonggang Luo
2026-10-01 15:59 ` [PATCH 02/18] target/riscv: meson, add user and common system source sets Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 21:26   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 03/18] target/riscv: Move pmu CSR read to csr.h Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 21:26   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 04/18] target/riscv: Make debug.c target agnostic Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 21:32   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 05/18] target/riscv: Widen CSR ops to 64-bit and compile once for system-mode Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:04   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 06/18] target/riscv: Runtime CPU registration Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:10   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 07/18] target/riscv: Runtime register MAX and BARE CPUs Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 16:28   ` Yonggang Luo
2026-10-01 22:19     ` Pierrick Bouvier
2026-10-02 15:42       ` Anton Johansson via qemu development
2026-10-02 15:42         ` Anton Johansson via
2026-10-02 15:46         ` Yonggang Luo
2026-10-02 15:49         ` Yonggang Luo
2026-10-02 18:07         ` Yonggang Luo
2026-10-06 23:15           ` Anton Johansson via qemu development
2026-10-06 23:15             ` Anton Johansson via
2026-10-07  7:25             ` Yonggang Luo
2026-10-01 15:59 ` [PATCH 08/18] target/riscv: cpu.c unconditionally check larger MXL Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:14   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 09/18] target/riscv: Stub KVM functions for machines.c/cpu.c Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:11   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 10/18] target/riscv: Compile cpu.c once for system-mode Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:11   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 11/18] target/riscv: Compile cpu_helper.c " Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:11   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 12/18] target/riscv: Compile tcg-cpu.c " Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:12   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 13/18] target/riscv: Compile riscv-qmp-cmds.c once Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:12   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 14/18] target/riscv: Compile pmp.c once Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:12   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 15/18] target/riscv: Compile arch_dump.c once Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:12   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 16/18] target/riscv: Compile machine.c once Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:13   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 17/18] target/riscv: Compile time_helper.c once Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:13   ` Pierrick Bouvier
2026-10-01 15:59 ` [PATCH 18/18] target/riscv: Compile monitor.c once Anton Johansson via qemu development
2026-10-01 15:59   ` Anton Johansson via
2026-10-01 22:14   ` Pierrick Bouvier
2026-10-02  6:07   ` Philippe Mathieu-Daudé
2026-10-01 22:03 ` [PATCH 00/18] single-binary: target/riscv, compile subset of compilation units once Pierrick Bouvier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.