All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
To: Yonggang Luo <luoyonggang@gmail.com>, qemu-devel@nongnu.org
Cc: "Anthony PERARD" <anthony@xenproject.org>,
	"Felipe Balbi" <balbi@kernel.org>,
	"Aleksandar Rikalo" <arikalo@gmail.com>,
	"BALATON Zoltan" <balaton@eik.bme.hu>,
	"Philippe Mathieu-Daude" <philmd@mailo.com>,
	"Antony Pavlov" <antonynpavlov@gmail.com>,
	"Daniel Henrique Barboza" <daniel.barboza@oss.qualcomm.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Subbaraya Sundeep" <sundeep.lkml@gmail.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Max Filippov" <jcmvbkbc@gmail.com>,
	"Niek Linnenbank" <nieklinnenbank@gmail.com>,
	xen-devel@lists.xenproject.org, qemu-riscv@nongnu.org,
	"Jean-Christophe Dubois" <jcd@tribudubois.net>,
	qemu-ppc@nongnu.org, "Alexandre Iooss" <erdnaxe@crans.org>,
	"Weiwei Li" <liwei1518@gmail.com>,
	"Zhao Liu" <zhao1.liu@intel.com>,
	"Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Strahinja Jankovic" <strahinja.p.jankovic@gmail.com>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Thomas Huth" <th.huth+qemu@posteo.eu>,
	"Clément Chigot" <chigot@adacore.com>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Yoshinori Sato" <yoshinori.sato@nifty.com>,
	"Frederic Konrad" <konrad.frederic@yahoo.fr>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Chao Liu" <chao.liu@processmission.com>,
	"Sai Pavan Boddu" <sai.pavan.boddu@amd.com>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Huacai Chen" <chenhuacai@kernel.org>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Gaurav Sharma" <gaurav.sharma_7@nxp.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	qemu-arm@nongnu.org
Subject: Re: [PATCH 00/15] hw: expand DEFINE_MACHINE to explicit TypeInfo registration
Date: Fri, 30 Oct 2026 09:49:10 -0800	[thread overview]
Message-ID: <9c2a2e48-e15f-43ee-9eef-0ebb607ccafc@oss.qualcomm.com> (raw)
In-Reply-To: <20261030151539.1872-1-luoyonggang@gmail.com>

On 10/30/2026 7:15 AM, Yonggang Luo wrote:
> DEFINE_MACHINE and DEFINE_MACHINE_EXTENDED hide the TypeInfo and the type_init
> function that calls type_register_static(). A later change needs to pass a
> target mask into that registration, and the macros have no parameter for it.
> This series expands every caller first, with no behavior change, so the
> follow-up only replaces the type_register_static() call.
> 
> Each machine file gains a class_init function, a TypeInfo, and a type_init
> function that calls type_register_static(). The last patch removes
> DEFINE_MACHINE* and DEFINE_SECURE_MACHINE* from include/hw/core/boards.h.
> 
> Yonggang Luo (15):
>   hw/alpha: expand DEFINE_MACHINE in dp264.c
>   hw/m68k: expand DEFINE_MACHINE for M68K machines
>   hw/microblaze: expand DEFINE_MACHINE for MicroBlaze
>   hw/tricore: expand DEFINE_MACHINE in tricore_testboard.c
>   hw/arm: expand DEFINE_MACHINE for ARM machines
>   hw/riscv: expand DEFINE_MACHINE for RISC-V machines
>   hw/core/null-machine: expand DEFINE_MACHINE
>   hw/mips: expand DEFINE_MACHINE for MIPS machines
>   hw/ppc: expand DEFINE_MACHINE for PowerPC machines
>   hw/sh4: expand DEFINE_MACHINE in r2d.c
>   hw/sparc: expand DEFINE_MACHINE in leon3.c
>   hw/xenpv: expand DEFINE_MACHINE in xen_machine_pv.c
>   hw/xtensa: expand DEFINE_MACHINE in sim.c
>   hw/xtensa: expand DEFINE_MACHINE in virt.c
>   hw/core/boards: remove unused DEFINE_MACHINE* macros
> 
>  hw/alpha/dp264.c                    | 18 +++++++++--
>  hw/arm/bananapi_m2u.c               | 18 +++++++++--
>  hw/arm/cubieboard.c                 | 19 +++++++++---
>  hw/arm/digic_boards.c               | 18 +++++++++--
>  hw/arm/imx25_pdk.c                  | 18 +++++++++--
>  hw/arm/imx8mm-evk.c                 | 20 +++++++++---
>  hw/arm/integratorcp.c               | 14 ++++++---
>  hw/arm/kzm.c                        | 18 +++++++++--
>  hw/arm/max78000fthr.c               | 17 ++++++++--
>  hw/arm/mcimx6ul-evk.c               | 18 +++++++++--
>  hw/arm/mcimx7d-sabre.c              | 20 +++++++++---
>  hw/arm/msf2-som.c                   | 17 ++++++++--
>  hw/arm/netduino2.c                  | 17 ++++++++--
>  hw/arm/netduinoplus2.c              | 17 ++++++++--
>  hw/arm/olimex-stm32-h405.c          | 18 +++++++++--
>  hw/arm/orangepi.c                   | 19 +++++++++---
>  hw/arm/stm32vldiscovery.c           | 18 +++++++++--
>  hw/core/null-machine.c              | 18 +++++++++--
>  hw/m68k/an5206.c                    | 18 +++++++++--
>  hw/m68k/mcf5208.c                   | 18 +++++++++--
>  hw/microblaze/petalogix_ml605_mmu.c | 19 ++++++++++--
>  hw/microblaze/xlnx-zynqmp-pmu.c     | 19 ++++++++++--
>  hw/mips/boston.c                    | 18 +++++++++--
>  hw/mips/fuloong2e.c                 | 18 +++++++++--
>  hw/mips/malta.c                     | 12 ++++++--
>  hw/ppc/amigaone.c                   | 18 +++++++++--
>  hw/ppc/pegasos.c                    | 21 ++++++++-----
>  hw/ppc/ppc440_bamboo.c              | 18 +++++++++--
>  hw/ppc/prep.c                       | 18 +++++++++--
>  hw/ppc/sam460ex.c                   | 18 +++++++++--
>  hw/ppc/virtex_ml507.c               | 18 +++++++++--
>  hw/riscv/boston-aia.c               | 18 +++++++++--
>  hw/riscv/microblaze-v-generic.c     | 18 +++++++++--
>  hw/sh4/r2d.c                        | 18 +++++++++--
>  hw/sparc/leon3.c                    | 18 +++++++++--
>  hw/tricore/tricore_testboard.c      | 18 +++++++++--
>  hw/xenpv/xen_machine_pv.c           | 18 +++++++++--
>  hw/xtensa/sim.c                     | 18 +++++++++--
>  hw/xtensa/virt.c                    | 18 +++++++++--
>  include/hw/core/boards.h            | 48 -----------------------------
>  40 files changed, 605 insertions(+), 142 deletions(-)
> 

So far, this expansion has been done only on machines that required to
modify TypeInfo: mostly virt types, which are ambiguous between targets
and require to introduce is_available.

Maybe this can be delayed for when such machines require it also.

Regards,
Pierrick


  parent reply	other threads:[~2026-10-30 17:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-30 15:15 [PATCH 00/15] hw: expand DEFINE_MACHINE to explicit TypeInfo registration Yonggang Luo
2026-10-30 15:15 ` [PATCH 01/15] hw/alpha: expand DEFINE_MACHINE in dp264.c Yonggang Luo
2026-10-30 15:15 ` [PATCH 02/15] hw/m68k: expand DEFINE_MACHINE for M68K machines Yonggang Luo
2026-10-30 15:15 ` [PATCH 03/15] hw/microblaze: expand DEFINE_MACHINE for MicroBlaze Yonggang Luo
2026-10-30 15:15 ` [PATCH 04/15] hw/tricore: expand DEFINE_MACHINE in tricore_testboard.c Yonggang Luo
2026-10-30 15:15 ` [PATCH 05/15] hw/arm: expand DEFINE_MACHINE for ARM machines Yonggang Luo
2026-10-30 15:15 ` [PATCH 06/15] hw/riscv: expand DEFINE_MACHINE for RISC-V machines Yonggang Luo
2026-10-30 15:15 ` [PATCH 07/15] hw/core/null-machine: expand DEFINE_MACHINE Yonggang Luo
2026-10-30 15:15 ` [PATCH 08/15] hw/mips: expand DEFINE_MACHINE for MIPS machines Yonggang Luo
2026-10-30 15:15 ` [PATCH 09/15] hw/ppc: expand DEFINE_MACHINE for PowerPC machines Yonggang Luo
2026-10-30 15:15 ` [PATCH 10/15] hw/sh4: expand DEFINE_MACHINE in r2d.c Yonggang Luo
2026-10-30 15:15 ` [PATCH 11/15] hw/sparc: expand DEFINE_MACHINE in leon3.c Yonggang Luo
2026-10-30 15:15 ` [PATCH 12/15] hw/xenpv: expand DEFINE_MACHINE in xen_machine_pv.c Yonggang Luo
2026-10-30 15:15 ` [PATCH 13/15] hw/xtensa: expand DEFINE_MACHINE in sim.c Yonggang Luo
2026-10-30 15:15 ` [PATCH 14/15] hw/xtensa: expand DEFINE_MACHINE in virt.c Yonggang Luo
2026-10-30 15:15 ` [PATCH 15/15] hw/core/boards: remove unused DEFINE_MACHINE* macros Yonggang Luo
2026-10-30 17:49 ` Pierrick Bouvier [this message]
2026-10-31  0:09 ` [PATCH 00/15] hw: expand DEFINE_MACHINE to explicit TypeInfo registration BALATON Zoltan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9c2a2e48-e15f-43ee-9eef-0ebb607ccafc@oss.qualcomm.com \
    --to=pierrick.bouvier@oss.qualcomm.com \
    --cc=alistair.francis@wdc.com \
    --cc=alistair@alistair23.me \
    --cc=anthony@xenproject.org \
    --cc=antonynpavlov@gmail.com \
    --cc=arikalo@gmail.com \
    --cc=atar4qemu@gmail.com \
    --cc=aurelien@aurel32.net \
    --cc=balaton@eik.bme.hu \
    --cc=balbi@kernel.org \
    --cc=chao.liu@processmission.com \
    --cc=chenhuacai@kernel.org \
    --cc=chigot@adacore.com \
    --cc=daniel.barboza@oss.qualcomm.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=erdnaxe@crans.org \
    --cc=gaurav.sharma_7@nxp.com \
    --cc=hpoussin@reactos.org \
    --cc=jcd@tribudubois.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=konrad.frederic@yahoo.fr \
    --cc=liwei1518@gmail.com \
    --cc=luoyonggang@gmail.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=nieklinnenbank@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@mailo.com \
    --cc=philmd@oss.qualcomm.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sai.pavan.boddu@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=strahinja.p.jankovic@gmail.com \
    --cc=sundeep.lkml@gmail.com \
    --cc=th.huth+qemu@posteo.eu \
    --cc=xen-devel@lists.xenproject.org \
    --cc=yoshinori.sato@nifty.com \
    --cc=zhao1.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.