On 10/7/2026 4:47 AM, Yonggang Luo wrote:
> From: Pierrick Bouvier <[email protected]>
> 
> Now that we remove machine_typename, we don't need to keep duplicated
> file per target anymore. So we can just rely on target-info-stub.c.
> 
> Signed-off-by: Pierrick Bouvier <[email protected]>
> Signed-off-by: Yonggang Luo <[email protected]>
> ---
>  MAINTAINERS                       |  1 -
>  configs/targets/aarch64-softmmu.c | 25 -------------------------
>  configs/targets/arm-softmmu.c     | 25 -------------------------
>  configs/targets/meson.build       |  6 ------
>  configs/targets/riscv32-softmmu.c | 24 ------------------------
>  configs/targets/riscv64-softmmu.c | 24 ------------------------
>  meson.build                       |  7 +------
>  7 files changed, 1 insertion(+), 111 deletions(-)
>  delete mode 100644 configs/targets/aarch64-softmmu.c
>  delete mode 100644 configs/targets/arm-softmmu.c
>  delete mode 100644 configs/targets/meson.build
>  delete mode 100644 configs/targets/riscv32-softmmu.c
>  delete mode 100644 configs/targets/riscv64-softmmu.c
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 1312bbd1bd8..cfe39dc2883 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -2148,7 +2148,6 @@ M: Philippe Mathieu-Daudé <[email protected]>
>  S: Supported
>  F: include/qemu/target-info*.h
>  F: target-info*.c
> -F: configs/targets/*.c
>  F: tests/unit/test-multi-targets.c
>  
>  Xtensa Machines
> diff --git a/configs/targets/aarch64-softmmu.c 
> b/configs/targets/aarch64-softmmu.c
> deleted file mode 100644
> index fdebdcc3582..00000000000
> --- a/configs/targets/aarch64-softmmu.c
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -/*
> - * QEMU binary/target API (qemu-system-aarch64)
> - *
> - *  Copyright (c) Linaro
> - *
> - * SPDX-License-Identifier: GPL-2.0-or-later
> - */
> -
> -#include "qemu/osdep.h"
> -#include "qemu/target-info-impl.h"
> -#include "qemu/target-info-init.h"
> -#include "target/arm/cpu-qom.h"
> -#include "target/arm/cpu-param.h"
> -
> -static const TargetInfo target_info_aarch64_system = {
> -    .target_name = "aarch64",
> -    .target_arch = SYS_EMU_TARGET_AARCH64,
> -    .long_bits = 64,
> -    .cpu_type = TYPE_ARM_CPU,
> -    .endianness = ENDIAN_MODE_LITTLE,
> -    .page_bits_vary = true,
> -    .page_bits_init = TARGET_PAGE_BITS_LEGACY,
> -};
> -
> -target_info_init(target_info_aarch64_system)
> diff --git a/configs/targets/arm-softmmu.c b/configs/targets/arm-softmmu.c
> deleted file mode 100644
> index 2b98f65a0f8..00000000000
> --- a/configs/targets/arm-softmmu.c
> +++ /dev/null
> @@ -1,25 +0,0 @@
> -/*
> - * QEMU binary/target API (qemu-system-arm)
> - *
> - *  Copyright (c) Linaro
> - *
> - * SPDX-License-Identifier: GPL-2.0-or-later
> - */
> -
> -#include "qemu/osdep.h"
> -#include "qemu/target-info-impl.h"
> -#include "qemu/target-info-init.h"
> -#include "target/arm/cpu-qom.h"
> -#include "target/arm/cpu-param.h"
> -
> -static const TargetInfo target_info_arm_system = {
> -    .target_name = "arm",
> -    .target_arch = SYS_EMU_TARGET_ARM,
> -    .long_bits = 32,
> -    .cpu_type = TYPE_ARM_CPU,
> -    .endianness = ENDIAN_MODE_LITTLE,
> -    .page_bits_vary = true,
> -    .page_bits_init = TARGET_PAGE_BITS_LEGACY,
> -};
> -
> -target_info_init(target_info_arm_system)
> diff --git a/configs/targets/meson.build b/configs/targets/meson.build
> deleted file mode 100644
> index 2ab4d27eaf5..00000000000
> --- a/configs/targets/meson.build
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -foreach target : [
> -      'arm-softmmu', 'aarch64-softmmu',
> -      'riscv32-softmmu', 'riscv64-softmmu'
> -  ]
> -  config_target_info += {target : files(target + '.c')}
> -endforeach
> diff --git a/configs/targets/riscv32-softmmu.c 
> b/configs/targets/riscv32-softmmu.c
> deleted file mode 100644
> index 0829ab84de5..00000000000
> --- a/configs/targets/riscv32-softmmu.c
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -/*
> - * QEMU binary/target API (qemu-system-riscv32)
> - *
> - *  Copyright (c) rev.ng Labs Srl.
> - *
> - * SPDX-License-Identifier: GPL-2.0-or-later
> - */
> -
> -#include "qemu/osdep.h"
> -#include "qemu/target-info-impl.h"
> -#include "qemu/target-info-init.h"
> -#include "target/riscv/cpu-qom.h"
> -#include "target/riscv/cpu-param.h"
> -
> -static const TargetInfo target_info_riscv32_system = {
> -    .target_name = "riscv32",
> -    .target_arch = SYS_EMU_TARGET_RISCV32,
> -    .long_bits = 32,
> -    .cpu_type = TYPE_RISCV_CPU,
> -    .endianness = ENDIAN_MODE_LITTLE,
> -    .page_bits_init = TARGET_PAGE_BITS,
> -};
> -
> -target_info_init(target_info_riscv32_system)
> diff --git a/configs/targets/riscv64-softmmu.c 
> b/configs/targets/riscv64-softmmu.c
> deleted file mode 100644
> index 553bd1f75fe..00000000000
> --- a/configs/targets/riscv64-softmmu.c
> +++ /dev/null
> @@ -1,24 +0,0 @@
> -/*
> - * QEMU binary/target API (qemu-system-riscv64)
> - *
> - *  Copyright (c) rev.ng Labs Srl.
> - *
> - * SPDX-License-Identifier: GPL-2.0-or-later
> - */
> -
> -#include "qemu/osdep.h"
> -#include "qemu/target-info-impl.h"
> -#include "qemu/target-info-init.h"
> -#include "target/riscv/cpu-qom.h"
> -#include "target/riscv/cpu-param.h"
> -
> -static const TargetInfo target_info_riscv64_system = {
> -    .target_name = "riscv64",
> -    .target_arch = SYS_EMU_TARGET_RISCV64,
> -    .long_bits = 64,
> -    .cpu_type = TYPE_RISCV_CPU,
> -    .endianness = ENDIAN_MODE_LITTLE,
> -    .page_bits_init = TARGET_PAGE_BITS,
> -};
> -
> -target_info_init(target_info_riscv64_system)
> diff --git a/meson.build b/meson.build
> index 828100de816..64d3f7675f7 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -3754,7 +3754,6 @@ subdir('dump')
>  subdir('accel')
>  
>  subdir('backends')
> -subdir('configs/targets')
>  subdir('disas')
>  subdir('migration')
>  subdir('monitor')
> @@ -4346,11 +4345,7 @@ foreach target : target_dirs
>      endif
>    endif
>  
> -  if target in config_target_info
> -    arch_srcs += config_target_info[target]
> -  else
> -    arch_srcs += files('target-info-stub.c')
> -  endif
> +  arch_srcs += files('target-info-stub.c')
>  
>    if target_base_arch in target_arch
>      t = target_arch[target_base_arch].apply(config_target, strict: false)

We delayed this patch because initially we thought we might need to add
other things in this struct (per target). However, it was not proven it
was needed, thus I'll pull this.

Thanks,
Pierrick

Reply via email to