Skip to content

RFC qemu: Remove TARGET_NAME definition

Philippe Mathieu-Daudé qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest11 patches 21 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11system: Extract target-specific globals to their own compilation unitsystem/arch_init.c system/globals-target.c system/meson.build+25 -144 replies
2/11system: Open-code qemu_init_arch_modules() using target_name()include/system/arch_init.h system/arch_init.c system/vl.c+6 -121 reply
3/11system: Introduce QemuArchBit enuminclude/system/arch_init.h meson.build system/arch_init.c+46 -257 replies
4/11system: Replace arch_type global by qemu_arch_available() helperhw/scsi/scsi-disk.c include/system/arch_init.h system/arch_init.c +2 more+11 -81 reply
5/11include: Expose QemuArchBit enum to user emulationarch_info-target.c hw/scsi/scsi-disk.c include/qemu/arch_info.h +4 more+7 -81 reply
6/11include: Declare target_name() in common "qemu/arch_info.h"arch_info-target.c cpu-target.c hw/core/machine-qmp-cmds.c +3 more+8 -81 reply
7/11plugins/loader: populate target_name with target_name()plugins/loader.c+2 -10 replies
8/11tests/qtest: Replace TARGET_NAME -> target_name()tests/qtest/fuzz/fuzz.c tests/qtest/fuzz/generic_fuzz.c tests/qtest/fuzz/i440fx_fuzz.c +1 more+10 -91 reply
9/11user: Replace TARGET_NAME -> target_name()bsd-user/main.c linux-user/main.c+13 -80 replies
10/11qemu: Introduce qemu_arch_name() helperarch_info-target.c include/qemu/arch_info.h+35 -15 replies
11/11qemu: Remove C definitions of TARGET_NAMEinclude/exec/poison.h include/qemu/osdep.h meson.build+5 -20 replies

Reviews trailers per patch

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

PatchRichard HendersonPhilippe Mathieu-DaudéAlex Bennée
1/11R-b
2/11R-b
3/11
4/11R-b
5/11A-b
6/11R-b
7/11R-b R-b
8/11
9/11
10/11
11/11

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 v1 thread

Cover letter [RFC PATCH 00/11] qemu: Remove TARGET_NAME definition

Replace all TARGET_NAME uses by target_name() runtime, then remove the definition and poison it.

While is looks like another cleanup, it is a small step required for the single binary project.

Alex Bennée (1):
plugins/loader: populate target_name with target_name()

Philippe Mathieu-Daudé (10):
system: Extract target-specific globals to their own compilation unit
system: Open-code qemu_init_arch_modules() using target_name()
system: Introduce QemuArchBit enum
system: Replace arch_type global by qemu_arch_available() helper
include: Expose QemuArchBit enum to user emulation
include: Declare target_name() in common "qemu/arch_info.h" tests/qtest: Replace TARGET_NAME -> target_name()
user: Replace TARGET_NAME -> target_name()
qemu: Introduce qemu_arch_name() helper
qemu: Remove C definitions of TARGET_NAME

 meson.build                     | 10 +++--
 include/exec/poison.h           |  1 -
 include/hw/core/cpu.h           |  2 -
 include/qemu/arch_info.h        | 55 +++++++++++++++++++++++++++
 include/qemu/osdep.h            |  2 +
 include/system/arch_init.h      | 32 ----------------
 arch_info-target.c              | 67 +++++++++++++++++++++++++++++++++
 bsd-user/main.c                 |  9 +++--
 cpu-target.c                    |  5 ---
 hw/core/machine-qmp-cmds.c      |  1 +
 hw/scsi/scsi-disk.c             |  4 +-
 linux-user/main.c               | 12 +++---
 plugins/loader.c                |  3 +-
 system/arch_init.c              | 50 ------------------------
 system/globals-target.c         | 24 ++++++++++++
 system/qdev-monitor.c           |  6 +--
 system/vl.c                     | 14 ++++---
 tests/qtest/fuzz/fuzz.c         |  5 +--
 tests/qtest/fuzz/generic_fuzz.c |  4 +-
 tests/qtest/fuzz/i440fx_fuzz.c  |  5 ++-
 tests/qtest/fuzz/qos_fuzz.c     |  5 ++-
 system/meson.build              |  2 +-
 22 files changed, 195 insertions(+), 123 deletions(-)
 create mode 100644 include/qemu/arch_info.h
 delete mode 100644 include/system/arch_init.h
 create mode 100644 arch_info-target.c
 delete mode 100644 system/arch_init.c
 create mode 100644 system/globals-target.c
Signature · 1 line
2.47.1