kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 00/48] single-binary: compile target/arm twice
@ 2025-05-12 18:04 Pierrick Bouvier
  2025-05-12 18:04 ` [PATCH v8 01/48] target/arm: Replace target_ulong -> vaddr for HWBreakpoint Pierrick Bouvier
                   ` (47 more replies)
  0 siblings, 48 replies; 71+ messages in thread
From: Pierrick Bouvier @ 2025-05-12 18:04 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé, kvm, alex.bennee, anjo, qemu-arm,
	Peter Maydell, Paolo Bonzini, Richard Henderson, Pierrick Bouvier

More work toward single-binary.

Some files have external dependencies for the single-binary:
- target/arm/gdbstub.c: gdbhelpers
- target/arm/arm-qmp-cmds.c: qapi
- target/arm/tcg/translate*: need deep cleanup in include/tcg
- target/arm/tcg/cpu*: need TargetInfo implemented for arm/aarch64
- target/arm/tcg/*-helper*: need deeper split between aarch64 and arm code
They will not be ported in this series.

Built on {linux, windows, macos} x {x86_64, aarch64}
Fully tested on linux x {x86_64, aarch64}

Series is now tested and fully reviewed. Thanks for pulling it.

v8
--

- rebase on top of master

v7
--

- rebase on top of master
- removed patch to apply target config for picking files in libsystem/libuser,
  since it was the only one not reviewed.

v6
--

CI: https://github.com/pbo-linaro/qemu/actions/runs/14844742069/job/41675865456
- Replace target_ulong -> vaddr for HWBreakpoint (Philippe)
- build target/arm/tcg/crypto_helper.c once (Richard)
- build target/arm/tcg/tlb-insns for system only (Richard)
- build target/arm/tcg/arith_helper once (Richard)

v5
--

CI: https://github.com/pbo-linaro/qemu/actions/runs/14825451208/job/41617949501
- Do not define a separate vaddr type in tcg, simply alias to i32/i64 (Richard)
- target/arm/tcg/crypto_helper.c
- target/arm/tcg/hflags.c
- target/arm/tcg/iwmmxt_helper.c
- target/arm/tcg/neon_helper.c
- target/arm/tcg/tlb_helper.c
- target/arm/tcg/tlb-insns.c
- target/arm/tcg/arith_helper.c
- target/arm/tcg/vfp_helper.c

v4
--

CI: https://github.com/pbo-linaro/qemu/actions/runs/14816460393/job/41597560792
- add patch to apply target config for picking files in libsystem/libuser
  Useful for Philippe series for semihosting:
  https://lore.kernel.org/qemu-devel/20250502220524.81548-1-philmd@linaro.org/T/#me750bbaeeba4d16791121fe98b44202afaec4068
- update some patches description (Philippe & Richard)
- tcg: introduce vaddr type (Richard)
- modify concerned helpers to use vaddr instead of i64 (Richard)
- use int64_t instead of uint64_t for top_bits in ptw.c (Philippe)
- arm_casq_ptw: use CONFIG_ATOMIC64 instead of TARGET_AARCH64 and comment why
  (Richard)
- target/arm/machine.c

v3
--

CI: https://github.com/pbo-linaro/qemu/actions/runs/14765763846/job/41456754153
- Add missing license for new files (Richard)
- target/arm/debug_helper.c
- target/arm/helper.c
- target/arm/vfp_fpscr.c
- target/arm/arch_dump.c
- target/arm/arm-powerctl.c
- target/arm/cortex-regs.c
- target/arm/ptw.c
- target/arm/kvm-stub.c

v2
--

- Remove duplication of kvm struct and constant (Alex)
- Use target_big_endian() (Anton)

v1
--

- target/arm/cpu.c

Philippe Mathieu-Daudé (1):
  target/arm: Replace target_ulong -> vaddr for HWBreakpoint

Pierrick Bouvier (47):
  include/system/hvf: missing vaddr include
  meson: add common libs for target and target_system
  target/arm: move kvm stubs and remove CONFIG_KVM from kvm_arm.h
  target/arm/kvm-stub: add kvm_arm_reset_vcpu stub
  target/arm/cpu: move arm_cpu_kvm_set_irq to kvm.c
  target/arm/cpu: remove TARGET_BIG_ENDIAN dependency
  target/arm/cpu: remove TARGET_AARCH64 around aarch64_cpu_dump_state
    common
  target/arm/cpu: remove TARGET_AARCH64 in arm_cpu_finalize_features
  target/arm/cpu: compile file twice (user, system) only
  target/arm/cpu32-stubs.c: compile file twice (user, system)
  tcg: add vaddr type for helpers
  target/arm/helper: use vaddr instead of target_ulong for
    exception_pc_alignment
  target/arm/helper: use vaddr instead of target_ulong for probe_access
  target/arm/helper: extract common helpers
  target/arm/debug_helper: only include common helpers
  target/arm/debug_helper: remove target_ulong
  target/arm/debug_helper: compile file twice (user, system)
  target/arm/helper: restrict include to common helpers
  target/arm/helper: replace target_ulong by vaddr
  target/arm/helper: expose aarch64 cpu registration
  target/arm/helper: remove remaining TARGET_AARCH64
  target/arm/helper: compile file twice (user, system)
  target/arm/vfp_fpscr: compile file twice (user, system)
  target/arm/arch_dump: remove TARGET_AARCH64 conditionals
  target/arm/arch_dump: compile file once (system)
  target/arm/arm-powerctl: compile file once (system)
  target/arm/cortex-regs: compile file once (system)
  target/arm/ptw: replace target_ulong with int64_t
  target/arm/ptw: replace TARGET_AARCH64 by CONFIG_ATOMIC64 from
    arm_casq_ptw
  target/arm/ptw: compile file once (system)
  target/arm/meson: accelerator files are not needed in user mode
  target/arm/kvm-stub: compile file once (system)
  target/arm/machine: reduce migration include to avoid target specific
    definitions
  target/arm/machine: remove TARGET_AARCH64 from migration state
  target/arm/machine: move cpu_post_load kvm bits to
    kvm_arm_cpu_post_load function
  target/arm/kvm-stub: add missing stubs
  target/arm/machine: compile file once (system)
  target/arm/tcg/vec_internal: use forward declaration for CPUARMState
  target/arm/tcg/crypto_helper: compile file once
  target/arm/tcg/hflags: compile file twice (system, user)
  target/arm/tcg/iwmmxt_helper: compile file twice (system, user)
  target/arm/tcg/neon_helper: compile file twice (system, user)
  target/arm/tcg/tlb_helper: compile file twice (system, user)
  target/arm/helper: restrict define_tlb_insn_regs to system target
  target/arm/tcg/tlb-insns: compile file once (system)
  target/arm/tcg/arith_helper: compile file once
  target/arm/tcg/vfp_helper: compile file twice (system, user)

 meson.build                    |   78 ++-
 include/system/hvf.h           |    1 +
 include/tcg/tcg-op-common.h    |    1 +
 include/tcg/tcg.h              |   14 +
 target/arm/helper.h            | 1152 +------------------------------
 target/arm/internals.h         |    6 +-
 target/arm/kvm_arm.h           |   87 +--
 target/arm/tcg/helper.h        | 1153 ++++++++++++++++++++++++++++++++
 target/arm/tcg/vec_internal.h  |    2 +
 include/exec/helper-head.h.inc |   11 +
 target/arm/arch_dump.c         |    6 -
 target/arm/cpu.c               |   47 +-
 target/arm/cpu32-stubs.c       |   26 +
 target/arm/debug_helper.c      |    6 +-
 target/arm/helper.c            |   24 +-
 target/arm/hyp_gdbstub.c       |    6 +-
 target/arm/kvm-stub.c          |   97 +++
 target/arm/kvm.c               |   42 +-
 target/arm/machine.c           |   15 +-
 target/arm/ptw.c               |    6 +-
 target/arm/tcg/arith_helper.c  |    5 +-
 target/arm/tcg/crypto_helper.c |    6 +-
 target/arm/tcg/hflags.c        |    4 +-
 target/arm/tcg/iwmmxt_helper.c |    4 +-
 target/arm/tcg/neon_helper.c   |    4 +-
 target/arm/tcg/op_helper.c     |    2 +-
 target/arm/tcg/tlb-insns.c     |    7 -
 target/arm/tcg/tlb_helper.c    |    5 +-
 target/arm/tcg/translate-a64.c |    2 +-
 target/arm/tcg/translate.c     |    2 +-
 target/arm/tcg/vfp_helper.c    |    4 +-
 tcg/tcg.c                      |    5 +
 target/arm/meson.build         |   41 +-
 target/arm/tcg/meson.build     |   29 +-
 34 files changed, 1519 insertions(+), 1381 deletions(-)
 create mode 100644 target/arm/tcg/helper.h
 create mode 100644 target/arm/cpu32-stubs.c

-- 
2.47.2


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

end of thread, other threads:[~2025-05-14  6:12 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-12 18:04 [PATCH v8 00/48] single-binary: compile target/arm twice Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 01/48] target/arm: Replace target_ulong -> vaddr for HWBreakpoint Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 02/48] include/system/hvf: missing vaddr include Pierrick Bouvier
2025-05-13  9:58   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 03/48] meson: add common libs for target and target_system Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 04/48] target/arm: move kvm stubs and remove CONFIG_KVM from kvm_arm.h Pierrick Bouvier
2025-05-13  9:58   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 05/48] target/arm/kvm-stub: add kvm_arm_reset_vcpu stub Pierrick Bouvier
2025-05-13 10:00   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 06/48] target/arm/cpu: move arm_cpu_kvm_set_irq to kvm.c Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 07/48] target/arm/cpu: remove TARGET_BIG_ENDIAN dependency Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 08/48] target/arm/cpu: remove TARGET_AARCH64 around aarch64_cpu_dump_state common Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 09/48] target/arm/cpu: remove TARGET_AARCH64 in arm_cpu_finalize_features Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 10/48] target/arm/cpu: compile file twice (user, system) only Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 11/48] target/arm/cpu32-stubs.c: compile file twice (user, system) Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 12/48] tcg: add vaddr type for helpers Pierrick Bouvier
2025-05-13 10:03   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 13/48] target/arm/helper: use vaddr instead of target_ulong for exception_pc_alignment Pierrick Bouvier
2025-05-13 10:03   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 14/48] target/arm/helper: use vaddr instead of target_ulong for probe_access Pierrick Bouvier
2025-05-13 10:04   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 15/48] target/arm/helper: extract common helpers Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 16/48] target/arm/debug_helper: only include " Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 17/48] target/arm/debug_helper: remove target_ulong Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 18/48] target/arm/debug_helper: compile file twice (user, system) Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 19/48] target/arm/helper: restrict include to common helpers Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 20/48] target/arm/helper: replace target_ulong by vaddr Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 21/48] target/arm/helper: expose aarch64 cpu registration Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 22/48] target/arm/helper: remove remaining TARGET_AARCH64 Pierrick Bouvier
2025-05-13 10:06   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 23/48] target/arm/helper: compile file twice (user, system) Pierrick Bouvier
2025-05-13 10:06   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 24/48] target/arm/vfp_fpscr: " Pierrick Bouvier
2025-05-13 10:07   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 25/48] target/arm/arch_dump: remove TARGET_AARCH64 conditionals Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 26/48] target/arm/arch_dump: compile file once (system) Pierrick Bouvier
2025-05-13 10:07   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 27/48] target/arm/arm-powerctl: " Pierrick Bouvier
2025-05-13 10:07   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 28/48] target/arm/cortex-regs: " Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 29/48] target/arm/ptw: replace target_ulong with int64_t Pierrick Bouvier
2025-05-13 10:09   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 30/48] target/arm/ptw: replace TARGET_AARCH64 by CONFIG_ATOMIC64 from arm_casq_ptw Pierrick Bouvier
2025-05-13 10:41   ` Philippe Mathieu-Daudé
2025-05-13 17:03     ` Richard Henderson
2025-05-13 17:12       ` Philippe Mathieu-Daudé
2025-05-14  6:12         ` Richard Henderson
2025-05-12 18:04 ` [PATCH v8 31/48] target/arm/ptw: compile file once (system) Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 32/48] target/arm/meson: accelerator files are not needed in user mode Pierrick Bouvier
2025-05-13 10:10   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 33/48] target/arm/kvm-stub: compile file once (system) Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 34/48] target/arm/machine: reduce migration include to avoid target specific definitions Pierrick Bouvier
2025-05-13 10:43   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 35/48] target/arm/machine: remove TARGET_AARCH64 from migration state Pierrick Bouvier
2025-05-13 10:10   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 36/48] target/arm/machine: move cpu_post_load kvm bits to kvm_arm_cpu_post_load function Pierrick Bouvier
2025-05-13 10:45   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 37/48] target/arm/kvm-stub: add missing stubs Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 38/48] target/arm/machine: compile file once (system) Pierrick Bouvier
2025-05-13 10:11   ` Philippe Mathieu-Daudé
2025-05-12 18:04 ` [PATCH v8 39/48] target/arm/tcg/vec_internal: use forward declaration for CPUARMState Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 40/48] target/arm/tcg/crypto_helper: compile file once Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 41/48] target/arm/tcg/hflags: compile file twice (system, user) Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 42/48] target/arm/tcg/iwmmxt_helper: " Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 43/48] target/arm/tcg/neon_helper: " Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 44/48] target/arm/tcg/tlb_helper: " Pierrick Bouvier
2025-05-12 18:04 ` [PATCH v8 45/48] target/arm/helper: restrict define_tlb_insn_regs to system target Pierrick Bouvier
2025-05-12 18:05 ` [PATCH v8 46/48] target/arm/tcg/tlb-insns: compile file once (system) Pierrick Bouvier
2025-05-13 10:12   ` Philippe Mathieu-Daudé
2025-05-12 18:05 ` [PATCH v8 47/48] target/arm/tcg/arith_helper: compile file once Pierrick Bouvier
2025-05-12 18:05 ` [PATCH v8 48/48] target/arm/tcg/vfp_helper: compile file twice (system, user) Pierrick Bouvier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).