From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Cc: qemu-devel@nongnu.org, "Anton Johansson" <anjo@rev.ng>,
marcandre.lureau@redhat.com,
"Markus Armbruster" <armbru@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Max Filippov" <jcmvbkbc@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v4 0/6] single-binary: deduplicate target_info()
Date: Fri, 8 May 2026 17:10:01 +0100 [thread overview]
Message-ID: <af4K2fCa8SFR-C_J@redhat.com> (raw)
In-Reply-To: <20260505224826.2698753-1-pierrick.bouvier@oss.qualcomm.com>
On Tue, May 05, 2026 at 03:48:20PM -0700, Pierrick Bouvier wrote:
> We are getting close to be able to link several targets in a single QEMU system
> binary, and the last obstacle on the road is to embed several TargetInfo in the
> same binary. The end result of this series is to have a single definition for
> target_info symbol.
>
> This series adds TargetInfo types in QOM, and retrieve them dynamically(). At
> the moment, we don't deal yet with multiple TargetInfo selection, but install
> all that is needed to be able to do it easily.
>
> Because TargetInfo data is set through class_init, it creates an issue at
> startup, where we may try to instantiate additional (unrelated) types just to
> retrieve the list of "target-info-X" types. Those other types class_init may be
> using target information, to add target specific properties for instance.
> This issue has been fixed by adding a new object_class_get_list_by_name_prefix
> that does not force instantiation of all QOM types, but only those matching a
> specific pattern. This way, we first initialize and retrieve target-info types
> before others.
>
> An alternative would be to leave all this out of QOM, and use startup
> initializer to add them in a single list. However, because all the single-binary
> work has been using QOM where possible, it would be really sad to not use it for
> this final step. Comments are welcome!
>
> Finally, sticking to our promise not create a special "single-binary
> configuration", the goal is to use the *exact* same codepath for normal binaries
> also. It means that even for existing system binaries, the goal will be to use
> QOM to retrieve current target, even if there is only one.
>
> v4
> --
>
> - Revert to v2 MODULE_INIT_TARGET_INFO as Daniel didn't comment on issues about
> about MODULE_INIT_QOM_EARLY.
Sorry for not responding to that, other things got in the way
this week.
For clarity, I withdraw my objections from v2. Having seen how
my suggested approadch in v3 looked, I think you were correct
all along.
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 :|
next prev parent reply other threads:[~2026-05-08 16:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 22:48 [PATCH v4 0/6] single-binary: deduplicate target_info() Pierrick Bouvier
2026-05-05 22:48 ` [PATCH v4 1/6] target/xtensa/core: register types using type_init Pierrick Bouvier
2026-05-08 18:55 ` Richard Henderson
2026-05-05 22:48 ` [PATCH v4 2/6] qom/object: register OBJECT and INTERFACE QOM types before main Pierrick Bouvier
2026-05-08 18:55 ` Richard Henderson
2026-05-08 19:04 ` Pierrick Bouvier
2026-05-05 22:48 ` [PATCH v4 3/6] target-info: extract target_info() definition in target-info-init.h Pierrick Bouvier
2026-05-08 18:58 ` Richard Henderson
2026-05-05 22:48 ` [PATCH v4 4/6] target-info: introduce TargetInfo in QOM Pierrick Bouvier
2026-05-08 20:14 ` Richard Henderson
2026-05-08 21:54 ` Pierrick Bouvier
2026-05-05 22:48 ` [PATCH v4 5/6] target-info-qom: detect target from QOM Pierrick Bouvier
2026-05-08 20:29 ` Richard Henderson
2026-05-08 22:02 ` Pierrick Bouvier
2026-05-05 22:48 ` [PATCH v4 6/6] target-info: replace target_info() in system-mode Pierrick Bouvier
2026-05-08 20:29 ` Richard Henderson
2026-05-05 22:51 ` [PATCH v4 0/6] single-binary: deduplicate target_info() Pierrick Bouvier
2026-05-08 16:10 ` Daniel P. Berrangé [this message]
2026-05-08 18:58 ` Pierrick Bouvier
2026-05-09 0:57 ` 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=af4K2fCa8SFR-C_J@redhat.com \
--to=berrange@redhat.com \
--cc=anjo@rev.ng \
--cc=armbru@redhat.com \
--cc=jcmvbkbc@gmail.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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.