From: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, "Yonggang Luo" <luoyonggang@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>
Subject: Re: [PATCH 0/4] hw: support machine filtering without is_available
Date: Fri, 6 Nov 2026 09:13:18 -0800 [thread overview]
Message-ID: <db4879c7-e5ef-48ea-98ae-44f14a5e840e@oss.qualcomm.com> (raw)
In-Reply-To: <au3zw-IBajJYhiWN@redhat.com>
On 11/6/2026 7:35 AM, Daniel P. Berrangé wrote:
>>
>> Thanks for posting the series.
>>
>> Would that be possible to complete it so that beyond compilation, test
>> ./build/tests/unit/test-multi-target passes also? At the moment it fails
>> with duplicated types being registered.
>
> Oh I see, it didn't failure because I only enabled
> the two arm/aarch64 targets, once i add in more
> targets we get a clash on the virt-machine class.
>
> FYI, it also fails without my patch series present
> in some scenarios:
>
> # child process (/multi-targets/qom-types-are-unique/aarch64 [1950288]) stderr: "Registering `vm-launch-update' which already exists\n"
> **
> ERROR:../tests/unit/test-multi-target.c:41:test_qom_types_are_unique: child process (/multi-targets/qom-types-are-unique/aarch64 [1950288]) failed unexpectedly
> not ok /multi-targets/qom-types-are-unique/aarch64 - ERROR:../tests/unit/test-multi-target.c:41:test_qom_types_are_unique: child process (/multi-targets/qom-types-are-unique/aarch64 [1950288]) failed unexpectedly
> Bail out!
> Aborted (core dumped) tests/unit/test-multi-target
>
> This is caused by presence of 'igvm-devel' at build time on
> one of my machines (Fedora), which enables this device type,
> if you have both arm and aarch64 targets enabled.
>
> We need to add igvm to our Fedora dockerfile to catch this
> in CI.
>
> Moving it from specific_ss to system_ss make the test pass,
> but I'm unclear if it is sufficient to rely on lack of
> compiler and test complaints ? Or it needs manual code
> inspection to make sure the device is safe in this
> scenario ?
>
We are guaranteed a "common" file works because config poisoning ensures
the whole compilation unit, including headers, does not use any target
specific code (#ifdef).
So if it compiles, it's a safe change.
>> That's why this is_available was introduced in the first place. It was
>> just a way to move forward and provide the multi-target test to prevent
>> regression while work on single-binary is continued by Yonggang.
>
> Right, so with my series, we would first need the class
> renames to fix the multi-target test.
>
Correct. That's why is_available was used to do selective registration
for virt and max cpu, because I don't see how a rename can work without
breaking existing binaries.
Introducing .targets does not solve the problem by itself, since name
conflict is still there. That's why I suggested to use buckets per
target, which is what Yonggang implemented.
I have no strong attachment to any approach and would be happy to follow
any end-to-end solution you recommend. I'll let you lead on this.
> I should have labelled this posting "POC" as it was not
> tested thoroughly.
>
No worries, it would have been caught in CI anyway, so we are safe here.
> With regards,
> Daniel
Regards,
Pierrick
next prev parent reply other threads:[~2026-11-06 17:13 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 10:24 [PATCH 0/4] hw: support machine filtering without is_available Daniel P. Berrangé
2026-11-05 10:24 ` [PATCH 1/4] hw/core: record permitted targets against MachineClass Daniel P. Berrangé
2026-11-05 10:24 ` [PATCH 2/4] hw: replace 'is_available' with 'targets' in machines Daniel P. Berrangé
2026-11-05 10:24 ` [PATCH 3/4] target/riscv: remove 'is_available' from riscv CPUs Daniel P. Berrangé
2026-11-05 10:24 ` [PATCH 4/4] qom: drop the 'is_available' callback from TypeInfo Daniel P. Berrangé
2026-11-05 17:25 ` [PATCH 0/4] hw: support machine filtering without is_available Pierrick Bouvier
2026-11-06 15:35 ` Daniel P. Berrangé
2026-11-06 16:28 ` Yonggang Luo
2026-11-06 17:13 ` Pierrick Bouvier [this message]
2026-11-05 19:18 ` Yonggang Luo
2026-11-05 19:24 ` Pierrick Bouvier
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=db4879c7-e5ef-48ea-98ae-44f14a5e840e@oss.qualcomm.com \
--to=pierrick.bouvier@oss.qualcomm.com \
--cc=berrange@redhat.com \
--cc=luoyonggang@gmail.com \
--cc=philmd@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
/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.