This series cleans up the existing filtering interface we implemented
previously. It's cumbersome and incomplete, and we can have a much simpler
callback added in TypeInfo, to achieve the same result.

Also, it allows to remove a bunch of code, and remove duplication of target info
definitions per target, which is the biggest benefit.

Pierrick Bouvier (14):
  qom/object: add is_available callback to TypeInfo
  hw/arm: filter minimal set of machines
  system: query machines using TYPE_MACHINE
  target-info: remove machine_typename
  configs/targets: remove target info definitions
  target-info: rename target-info-stub.c in target-info-def.c
  hw/arm: remove TYPE_TARGET_{AARCH64,ARM}_MACHINE
  hw/arm: remove {arm,arm_aarch64,aarch64}_machine_interfaces
  hw/arm: remove DEFINE_MACHINE_{AARCH64,ARM}
  hw/arm: remove machines-qom.h
  hw/riscv: remove TYPE_TARGET_{RISCV32,RISCV64}_MACHINE
  hw/riscv: remove {riscv32,riscv32_64,riscv64}_machine_interfaces
  hw/riscv: remove DEFINE_MACHINE_{RISCV32,RISCV64}
  hw/riscv: remove machines-qom.h

 configs/targets/aarch64-softmmu.c         | 27 -------------
 configs/targets/arm-softmmu.c             | 27 -------------
 configs/targets/meson.build               |  6 ---
 configs/targets/riscv32-softmmu.c         | 26 -------------
 configs/targets/riscv64-softmmu.c         | 26 -------------
 hw/arm/aspeed.c                           |  1 -
 hw/arm/aspeed_ast1040_evb.c               |  2 -
 hw/arm/aspeed_ast10x0_evb.c               |  3 --
 hw/arm/aspeed_ast2400_palmetto.c          |  2 -
 hw/arm/aspeed_ast2400_quanta-q71l.c       |  2 -
 hw/arm/aspeed_ast2400_supermicrox11.c     |  2 -
 hw/arm/aspeed_ast2500_evb.c               |  2 -
 hw/arm/aspeed_ast2500_g220a.c             |  2 -
 hw/arm/aspeed_ast2500_romulus.c           |  2 -
 hw/arm/aspeed_ast2500_supermicro-x11spi.c |  2 -
 hw/arm/aspeed_ast2500_tiogapass.c         |  2 -
 hw/arm/aspeed_ast2500_witherspoon.c       |  2 -
 hw/arm/aspeed_ast2500_yosemitev2.c        |  2 -
 hw/arm/aspeed_ast2600_anacapa.c           |  2 -
 hw/arm/aspeed_ast2600_bletchley.c         |  2 -
 hw/arm/aspeed_ast2600_catalina.c          |  2 -
 hw/arm/aspeed_ast2600_evb.c               |  2 -
 hw/arm/aspeed_ast2600_fby35.c             |  2 -
 hw/arm/aspeed_ast2600_fuji.c              |  2 -
 hw/arm/aspeed_ast2600_gb200nvl.c          |  2 -
 hw/arm/aspeed_ast2600_rainier.c           |  2 -
 hw/arm/aspeed_ast27x0-fc.c                |  3 +-
 hw/arm/aspeed_ast27x0_evb.c               |  5 +--
 hw/arm/ax3000-boards.c                    |  2 -
 hw/arm/b-l475e-iot01a.c                   |  2 -
 hw/arm/bananapi_m2u.c                     |  3 +-
 hw/arm/collie.c                           |  2 -
 hw/arm/cubieboard.c                       |  3 +-
 hw/arm/digic_boards.c                     |  3 +-
 hw/arm/exynos4_boards.c                   |  3 --
 hw/arm/imx25_pdk.c                        |  3 +-
 hw/arm/imx8mm-evk.c                       |  3 +-
 hw/arm/imx8mp-evk.c                       |  2 -
 hw/arm/integratorcp.c                     |  3 +-
 hw/arm/kzm.c                              |  3 +-
 hw/arm/max78000fthr.c                     |  3 +-
 hw/arm/mcimx6ul-evk.c                     |  3 +-
 hw/arm/mcimx7d-sabre.c                    |  3 +-
 hw/arm/microbit.c                         |  2 -
 hw/arm/mps2-tz.c                          |  5 ---
 hw/arm/mps2.c                             |  5 ---
 hw/arm/mps3r.c                            |  2 -
 hw/arm/msf2-som.c                         |  3 +-
 hw/arm/musca.c                            |  3 --
 hw/arm/musicpal.c                         |  3 +-
 hw/arm/netduino2.c                        |  3 +-
 hw/arm/netduinoplus2.c                    |  3 +-
 hw/arm/npcm7xx_boards.c                   |  6 ---
 hw/arm/npcm8xx_boards.c                   |  2 -
 hw/arm/olimex-stm32-h405.c                |  3 +-
 hw/arm/omap_sx1.c                         |  3 --
 hw/arm/orangepi.c                         |  3 +-
 hw/arm/raspi.c                            |  8 +---
 hw/arm/raspi4b.c                          |  3 +-
 hw/arm/realview.c                         |  5 ---
 hw/arm/sabrelite.c                        |  2 -
 hw/arm/sbsa-ref.c                         |  2 -
 hw/arm/stellaris.c                        |  3 --
 hw/arm/stm32vldiscovery.c                 |  3 +-
 hw/arm/versatilepb.c                      |  3 --
 hw/arm/vexpress.c                         |  3 --
 hw/arm/virt.c                             |  2 -
 hw/arm/xen-pvh.c                          |  2 -
 hw/arm/xilinx_zynq.c                      |  2 -
 hw/arm/xlnx-versal-virt.c                 |  3 --
 hw/arm/xlnx-zcu102.c                      |  2 -
 hw/core/machine-qmp-cmds.c                |  2 +-
 hw/core/null-machine.c                    |  9 +----
 hw/nitro/machine.c                        |  6 ---
 hw/remote/machine.c                       |  3 --
 hw/riscv/boston-aia.c                     |  3 +-
 hw/riscv/k230.c                           |  2 -
 hw/riscv/microblaze-v-generic.c           |  3 +-
 hw/riscv/microchip_pfsoc.c                |  2 -
 hw/riscv/opentitan.c                      |  2 -
 hw/riscv/shakti_c.c                       |  2 -
 hw/riscv/sifive_e.c                       |  2 -
 hw/riscv/sifive_u.c                       |  2 -
 hw/riscv/spike.c                          |  2 -
 hw/riscv/tt_atlantis.c                    |  2 -
 hw/riscv/virt.c                           |  3 --
 hw/riscv/xiangshan_kmh.c                  |  2 -
 include/hw/arm/machines-qom.h             | 46 -----------------------
 include/hw/riscv/machines-qom.h           | 46 -----------------------
 include/qemu/target-info-impl.h           |  2 -
 include/qemu/target-info.h                |  8 ----
 include/qom/object.h                      |  3 ++
 meson.build                               |  7 +---
 monitor/qemu-config-qmp.c                 |  2 +-
 qom/object.c                              |  4 ++
 rust/qom/src/qom.rs                       |  1 +
 system/vl.c                               |  5 +--
 target-info-stub.c => target-info-def.c   |  1 -
 target-info-qom.c                         | 23 ------------
 target-info.c                             |  5 ---
 target/arm/machine.c                      | 18 ---------
 target/riscv/machine.c                    | 17 ---------
 102 files changed, 39 insertions(+), 488 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
 delete mode 100644 include/hw/arm/machines-qom.h
 delete mode 100644 include/hw/riscv/machines-qom.h
 rename target-info-stub.c => target-info-def.c (96%)

-- 
2.43.0


Reply via email to