All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] single-binary: deduplicate target_info()
@ 2026-04-28 23:45 Pierrick Bouvier
  2026-04-28 23:45 ` [PATCH 1/6] target-info: extract target_info() definition in target-info-init.h Pierrick Bouvier
                   ` (6 more replies)
  0 siblings, 7 replies; 19+ messages in thread
From: Pierrick Bouvier @ 2026-04-28 23:45 UTC (permalink / raw)
  To: qemu-devel
  Cc: Markus Armbruster, Daniel P. Berrangé, Pierrick Bouvier,
	Philippe Mathieu-Daudé, Anton Johansson, Richard Henderson,
	Paolo Bonzini

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.

Pierrick Bouvier (6):
  target-info: extract target_info() definition in target-info-init.h
  target-info: introduce TargetInfo in QOM
  system/vl: initialize QOM first
  qom/object: add object_class_get_list_by_name_prefix
  target-info-qom: detect target from QOM
  target-info: replace target_info() in system-mode

 configs/targets/aarch64-softmmu.c |  6 +--
 configs/targets/arm-softmmu.c     |  6 +--
 include/qemu/target-info-init.h   | 63 +++++++++++++++++++++++++++++++
 include/qemu/target-info-qom.h    | 25 ++++++++++++
 include/qom/object.h              | 13 +++++++
 qom/object.c                      | 40 ++++++++++++++++++++
 system/runstate.c                 |  1 -
 system/vl.c                       |  5 +++
 target-info-qom.c                 | 32 ++++++++++++++++
 target-info-stub.c                |  6 +--
 10 files changed, 184 insertions(+), 13 deletions(-)
 create mode 100644 include/qemu/target-info-init.h
 create mode 100644 include/qemu/target-info-qom.h

-- 
2.43.0



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-04-30  4:04 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 23:45 [PATCH 0/6] single-binary: deduplicate target_info() Pierrick Bouvier
2026-04-28 23:45 ` [PATCH 1/6] target-info: extract target_info() definition in target-info-init.h Pierrick Bouvier
2026-04-29  8:36   ` marcandre.lureau
2026-04-28 23:45 ` [PATCH 2/6] target-info: introduce TargetInfo in QOM Pierrick Bouvier
2026-04-29  8:36   ` marcandre.lureau
2026-04-29 18:22     ` Pierrick Bouvier
2026-04-28 23:45 ` [PATCH 3/6] system/vl: initialize QOM first Pierrick Bouvier
2026-04-29  8:36   ` marcandre.lureau
2026-04-29  8:46     ` Daniel P. Berrangé
2026-04-29 21:23       ` Pierrick Bouvier
2026-04-28 23:45 ` [PATCH 4/6] qom/object: add object_class_get_list_by_name_prefix Pierrick Bouvier
2026-04-29  8:36   ` marcandre.lureau
2026-04-29  8:48     ` Daniel P. Berrangé
2026-04-29 21:20       ` Pierrick Bouvier
2026-04-28 23:45 ` [PATCH 5/6] target-info-qom: detect target from QOM Pierrick Bouvier
2026-04-29  8:36   ` marcandre.lureau
2026-04-28 23:45 ` [PATCH 6/6] target-info: replace target_info() in system-mode Pierrick Bouvier
2026-04-29  8:36   ` marcandre.lureau
2026-04-30  4:00 ` [PATCH 0/6] single-binary: deduplicate target_info() Pierrick Bouvier

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.