All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] migration/qdev: Remove TYPE_DEVICE dependency on migration object
@ 2026-06-04 23:11 Peter Xu
  2026-06-04 23:11 ` [PATCH 1/4] qdev: Pave way for exporting Property to be used in non-qdev Peter Xu
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Peter Xu @ 2026-06-04 23:11 UTC (permalink / raw)
  To: qemu-devel
  Cc: peterx, Marc-André Lureau, Fabiano Rosas, Juraj Marcin,
	Vladimir Sementsov-Ogievskiy, Daniel P. Berrangé,
	Sana Sharma, Eric Blake, Markus Armbruster, Kevin Wolf,
	Paolo Bonzini, Philippe Mathieu-Daudé, Mark Cave-Ayland,
	Akihiko Odaki, Cédric Le Goater, Dr . David Alan Gilbert

CI: https://gitlab.com/peterx/qemu/-/pipelines/2577688365

This is v1 of the series, rfc can be found here:

  https://lore.kernel.org/r/20251209162857.857593-1-peterx@redhat.com

I got no positive feedback on OBJECT_COMPAT in rfc, so I dropped it.

This v1 removed all OBJECT_COMPAT patches, instead migration object will
stick with custom instance_post_init() to apply compat / global properties.

The goal of this series is to remove TYPE_DEVICE dependency for migration
object.  As a side effect, making qdev-properties available to all objects
not only qdev.

After this series, other TYPE_OBJECT can also leverage qdev properties.
Quite a few features I liked:

- simple declaration on setter/getter/defaults, objects can define, e.g.,

  Property prop = DEFINE_PROP_UINT32(...);

  Then in its class_init(), do:

  object_class_add_property(klass, &prop);

- support compat properties, and one more line to support -globals

Two things I intentionally didn't do:

- Go further to remove qdev properties dependency for migration object.  In
  that case I will need to implement most of the qdev property logic
  separately, duplicating code.

- Go further to make qdev-properties to be some generic object-properties
  concept.  Logically we can do that but the rename all over the places
  will be a huge diffstat.  I don't want this simple and straightforward
  change to be buried inside.  So I hope (1) either it's not urgently
  needed, then we can so far stick with calling it qdev-properties (say, if
  we try grep qdev under qom/ we still get something.. so it's not like
  we're 100% cleared out on that..), or (2) at least it can be done
  separately as a separate goal.

Comments welcomed, thanks.

Peter Xu (4):
  qdev: Pave way for exporting Property to be used in non-qdev
  qdev: Introduce helper object_apply_globals()
  qdev: Refactor and rename of qdev_class_add_property()
  migration: Remove dependency to TYPE_DEVICE

 include/hw/core/qdev-properties.h   | 11 +++++++++
 migration/migration.h               |  2 +-
 hw/core/qdev-properties.c           | 36 ++++++++++++++++++++++-------
 migration/migration.c               | 33 +++++++++++++++-----------
 tests/unit/test-qdev-global-props.c |  6 ++++-
 5 files changed, 64 insertions(+), 24 deletions(-)

-- 
2.53.0



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

end of thread, other threads:[~2026-06-05 15:40 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04 23:11 [PATCH 0/4] migration/qdev: Remove TYPE_DEVICE dependency on migration object Peter Xu
2026-06-04 23:11 ` [PATCH 1/4] qdev: Pave way for exporting Property to be used in non-qdev Peter Xu
2026-06-05 10:53   ` Mark Cave-Ayland
2026-06-05 15:18     ` Fabiano Rosas
2026-06-05 14:39   ` Fabiano Rosas
2026-06-05 15:40     ` Peter Xu
2026-06-04 23:11 ` [PATCH 2/4] qdev: Introduce helper object_apply_globals() Peter Xu
2026-06-05  8:52   ` Daniel P. Berrangé
2026-06-05 14:44     ` Fabiano Rosas
2026-06-05 14:47       ` Daniel P. Berrangé
2026-06-05 15:06         ` Fabiano Rosas
2026-06-04 23:11 ` [PATCH 3/4] qdev: Refactor and rename of qdev_class_add_property() Peter Xu
2026-06-05  8:43   ` Daniel P. Berrangé
2026-06-05 15:21     ` Peter Xu
2026-06-04 23:11 ` [PATCH 4/4] migration: Remove dependency to TYPE_DEVICE Peter Xu
2026-06-05  8:30   ` Marc-André Lureau
2026-06-05  8:49     ` Daniel P. Berrangé
2026-06-05 15:36       ` Peter Xu

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.