mbox series

[00/13] single-binary: start make hw/arm/ common (boot.c)

Message ID 20250318045125.759259-1-pierrick.bouvier@linaro.org (mailing list archive)
Headers show
Series single-binary: start make hw/arm/ common (boot.c) | expand

Message

Pierrick Bouvier March 18, 2025, 4:51 a.m. UTC
This series focuses on removing compilation units duplication in hw/arm. We
start with this architecture because it should not be too hard to transform it,
and should give us some good hints on the difficulties we'll meet later.

We first start by making changes in global headers to be able to not rely on
specific target defines. We then focus on removing those defines from
target/arm/cpu.h.

From there, we modify build system to create a new hw common library (per base
architecture, "arm" in this case), instead of compiling the same files for every
target.

Finally, we can declare hw/arm/boot.c common as a first step for this subsystem.

This series needs to be applied on top of
https://lore.kernel.org/qemu-devel/20250317183417.285700-19-pierrick.bouvier@linaro.org/
to compile.

Pierrick Bouvier (13):
  exec/cpu-all: restrict BSWAP_NEEDED to target specific code
  exec/cpu-all: restrict compile time assert to target specific code
  exec/target_page: runtime defintion for TARGET_PAGE_BITS_MIN
  exec/cpu-all: allow to include specific cpu
  target/arm/cpu: move KVM_HAVE_MCE_INJECTION to kvm-all.c file directly
  exec/poison: KVM_HAVE_MCE_INJECTION can now be poisoned
  target/arm/cpu: always define kvm related registers
  target/arm/cpu: flags2 is always uint64_t
  target/arm/cpu: define ARM_MAX_VQ once for aarch32 and aarch64
  target/arm/cpu: define same set of registers for aarch32 and aarch64
  target/arm/cpu: remove inline stubs for aarch32 emulation
  meson: add common hw files
  hw/arm/boot: make compilation unit hw common

 meson.build                | 36 +++++++++++++++++++++++++++++++++++-
 include/exec/cpu-all.h     | 12 ++++++++++--
 include/exec/poison.h      |  2 ++
 include/exec/target_page.h |  3 +++
 include/system/kvm.h       |  2 --
 target/arm/cpu.h           | 28 +++-------------------------
 accel/kvm/kvm-all.c        |  4 ++++
 hw/arm/boot.c              |  1 +
 target/arm/helper.c        |  6 ++++++
 target/arm/tcg/hflags.c    |  4 ++--
 hw/arm/meson.build         |  5 ++++-
 11 files changed, 70 insertions(+), 33 deletions(-)