CI: https://gitlab.com/peterx/qemu/-/pipelines/2588717620
(two irrelevant failures due to no runner)
rfc: https://lore.kernel.org/r/20251209162857.857593-1-peterx@redhat.com
v1: https://lore.kernel.org/r/20260604231118.1584889-1-peterx@redhat.com
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
--
2.53.0