Skip to content

migration/qom: Remove TYPE_DEVICE dependency on migration object

Peter Xu qemu-arm qemu-devel qemu-rust 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest10 patches 36 repliesIn review
  2. v14 patches 13 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10migration: Use OBJECT_DECLARE_SIMPLE_TYPEmigration/migration.c migration/migration.h+4 -123 replies
2/10qdev: Export global_props()hw/core/qdev-properties.c include/hw/core/qdev-properties.h rust/bindings/hwcore-sys/lib.rs+4 -22 replies
3/10qdev: Introduce DEFINE_PROP_*_NODEFAULT for bool/uint32include/hw/core/qdev-properties.h+5 -01 reply
4/10hw/arm: Use nodefault version of qdev props when not neededhw/arm/bcm2836.c target/arm/cpu64.c+4 -21 reply
5/10qom: Create object-property-ptr.[ch]include/qom/object-property-ptr.h include/qom/object.h qom/meson.build +2 more+358 -33311 replies
6/10qom: Add object_property_add_bool_ptr()include/qom/object-property-ptr.h qom/object-property-ptr.c+54 -02 replies
7/10qom: Add object_property_add_size_ptr()include/qom/object-property-ptr.h qom/object-property-ptr.c+56 -01 reply
8/10qom: Add object_property_add_*_ptr_def()include/qom/object-property-ptr.h qom/object-property-ptr.c+95 -02 replies
9/10qom: Allow default values for instance propertiesqom/object.c+26 -04 replies
10/10migration: Switch to TYPE_OBJECT with object propertiesmigration/migration.c migration/options.c migration/options.h+351 -2186 replies

Reviews trailers per patch

8 of 10 patches have a Reviewed-by or Acked-by.

PatchFabiano RosasDaniel P. BerrangéMark Cave-Ayland
1/10R-b R-b R-b
2/10R-b R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b R-b
7/10R-b
8/10R-b
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 00/10] migration/qom: Remove TYPE_DEVICE dependency on migration object

CI: https://gitlab.com/peterx/qemu/-/pipelines/2588717620
(two irrelevant failures due to no runner)

rfc: https://lore.kernel.org/r/[email protected]
v1:  https://lore.kernel.org/r/[email protected]

This v2 is a full rewrite of v1, changelog doesn't apply.

This version majorly addressed the concern in v1 having object API exported in qdev files. Instead of trying to expose qdev properties, this patchset switched migration object to use the object property API to add properties.

Not all QOM facilities are ready for it, there're a few prior patches to improve QOM API to achieve it.

The major concept that this series introduces that does not exist previously is the default value mechanisms for object properties (rather than object class properties). Here migration object will rely on that to set default values.

Patch 1:   A cleanup to use OBJECT_DECLARE_SIMPLE_TYPE for migration
Patch 2-4: Qdev changes needed for the transition
Patch 5-9: Improve QOM API to prepare for the property switch
Patch 10:  Switch migration object to use TYPE_OBJECT and object props

Comments welcomed, thanks.

Peter Xu (10):
migration: Use OBJECT_DECLARE_SIMPLE_TYPE
qdev: Export global_props()
qdev: Introduce DEFINE_PROP_*_NODEFAULT for bool/uint32 hw/arm: Use nodefault version of qdev props when not needed
qom: Create object-property-ptr.[ch]
qom: Add object_property_add_bool_ptr()
qom: Add object_property_add_size_ptr()
qom: Add object_property_add_*_ptr_def()
qom: Allow default values for instance properties
migration: Switch to TYPE_OBJECT with object properties

 include/hw/core/qdev-properties.h |   7 +
 include/qom/object-property-ptr.h | 162 +++++++++
 include/qom/object.h              |  99 +-----
 migration/migration.h             |   9 +-
 migration/options.h               |   8 +-
 hw/arm/bcm2836.c                  |   3 +-
 hw/core/qdev-properties.c         |   2 +-
 migration/migration.c             |  42 ++-
 migration/options.c               | 526 +++++++++++++++++++-----------
 qom/object-property-ptr.c         | 394 ++++++++++++++++++++++
 qom/object.c                      | 266 ++-------------
 target/arm/cpu64.c                |   3 +-
 qom/meson.build                   |   1 +
 rust/bindings/hwcore-sys/lib.rs   |   2 +-
 14 files changed, 957 insertions(+), 567 deletions(-)
 create mode 100644 include/qom/object-property-ptr.h
 create mode 100644 qom/object-property-ptr.c
Signature · 1 line
2.53.0