[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 00/15] hw: expand DEFINE_MACHINE to explicit TypeInfo registration
- To: Pierrick Bouvier <pierrick.bouvier@xxxxxxxxxxxxxxxx>
- From: Daniel P. Berrangé <berrange@xxxxxxxxxx>
- Date: Thu, 5 Nov 2026 10:28:15 +0000
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=mimecast20190719 header.d=redhat.com header.i="@redhat.com" header.h="From:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References"
- Cc: Yonggang Luo <luoyonggang@xxxxxxxxx>, BALATON Zoltan <balaton@xxxxxxxxxx>, qemu-devel@xxxxxxxxxx, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, Felipe Balbi <balbi@xxxxxxxxxx>, Aleksandar Rikalo <arikalo@xxxxxxxxx>, Philippe Mathieu-Daude <philmd@xxxxxxxxx>, Antony Pavlov <antonynpavlov@xxxxxxxxx>, Daniel Henrique Barboza <daniel.barboza@xxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Subbaraya Sundeep <sundeep.lkml@xxxxxxxxx>, Hervé Poussineau <hpoussin@xxxxxxxxxxx>, Max Filippov <jcmvbkbc@xxxxxxxxx>, Niek Linnenbank <nieklinnenbank@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, qemu-riscv@xxxxxxxxxx, Jean-Christophe Dubois <jcd@xxxxxxxxxxxxxxx>, qemu-ppc@xxxxxxxxxx, Alexandre Iooss <erdnaxe@xxxxxxxxx>, Weiwei Li <liwei1518@xxxxxxxxx>, Zhao Liu <zhao1.liu@xxxxxxxxx>, Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>, Strahinja Jankovic <strahinja.p.jankovic@xxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxxxxxxxx>, Thomas Huth <th.huth+qemu@xxxxxxxxx>, Clément Chigot <chigot@xxxxxxxxxxx>, Mark Cave-Ayland <mark.cave-ayland@xxxxxxxxxxxx>, Yoshinori Sato <yoshinori.sato@xxxxxxxxx>, Frederic Konrad <konrad.frederic@xxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Peter Maydell <peter.maydell@xxxxxxxxxx>, Chao Liu <chao.liu@xxxxxxxxxxxxxxxxxx>, Sai Pavan Boddu <sai.pavan.boddu@xxxxxxx>, Alistair Francis <alistair@xxxxxxxxxxxxx>, Huacai Chen <chenhuacai@xxxxxxxxxx>, Aurelien Jarno <aurelien@xxxxxxxxxxx>, Gaurav Sharma <gaurav.sharma_7@xxxxxxx>, "Edgar E. Iglesias" <edgar.iglesias@xxxxxxxxx>, Richard Henderson <richard.henderson@xxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Artyom Tarasenko <atar4qemu@xxxxxxxxx>, qemu-arm@xxxxxxxxxx
- Delivery-date: Thu, 05 Nov 2026 10:28:46 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Nov 05, 2026 at 12:27:18AM -0800, Pierrick Bouvier wrote:
> On 11/3/2026 5:55 AM, Daniel P. Berrangé wrote:
> > On Tue, Nov 03, 2026 at 09:48:44PM +0800, Yonggang Luo wrote:
> >> On Tue, Nov 3, 2026 at 9:23 PM BALATON Zoltan <balaton@xxxxxxxxxx> wrote:
> >>>
> >>> On Tue, 3 Nov 2026, Yonggang Luo wrote:
> >>> That means exposing all the boiler plate for all machines other than the
> >>> simplest case. I think it would be better to keep DEFINE_MACHINE_EXTENDED
> >>> but maybe rethink the existing wrappers and drop unused ones and maybe add
> >>> new ones that reduce the usage of DEFINE_MACHINE_EXTENDED but still keep
> >>> the boiler plate hidden.
> >>
> >> Thanks, I'll go this way, remove unused macros, and keep
> >> DEFINE_MACHINE_EXTENDED
> >> and extend both DEFINE_MACHINE_EXTENDED DEFINE_MACHINE supports
> >> "targets" or "arch_mask" parameter.
> >
> > Given that we don't need to do general per-arch type filtering in
> > QOM, we could just move 'is_available' out of TypeInfo, and into the
> > MachineClass, so it is a regular class level property, which can be
> > set in the class_init methods, and thus avoid any changes to the
> > DEFINE_MACHINE macros.
> >
>
> Some cpus need it also, and it's used for filtering purpose at this time
> (to avoid duplication at registration). We already depend on this behavior.
Can you give me more info on the problem with the CPUs ? What cases
have duplicate class names with CPUs ?
With regards,
Daniel
--
|: https://berrange.com ~~ https://hachyderm.io/@berrange :|
|: https://libvirt.org ~~ https://entangle-photo.org :|
|: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|
|