All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] qom: tidy-ups and preparation for class property conversion
@ 2026-07-17 11:19 Mark Cave-Ayland
  2026-07-17 11:19 ` [PATCH 1/5] qom/object.c: introduce OBJECT_PROPERTY_SCALAR_GETTER(type) macro Mark Cave-Ayland
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Mark Cave-Ayland @ 2026-07-17 11:19 UTC (permalink / raw)
  To: palmer, alistair.francis, liwei1518, daniel.barboza, zhiwei_liu,
	chao.liu, pbonzini, berrange, qemu-riscv, qemu-devel

Based upon feedback from my existing efforts to start converting from object
properties to class properties, here is an initial preparation series which
I hope can be applied soon after 11.1 is released.

Patches 1-3 introduce macros to generate the QOM scalar get/set functions for scalar
memory-based properties as suggested by Daniel. This makes it trivial to add any
additional scalar types as required in future, and a similar pattern will be used
when introducing proper class properties.

Patch 4 adds missing documentation for the current object_class_* property functions
since if we're looking to deprecate object properties, it seems only fair to include
the replacement class property functions in our documentation. Again once class
propeties are added, the new functions will be documented in a similar way.

Finally patch 5 renames the existing object_class_property_uint*_ptr() functions to
object_class_static_property_uint*_ptr() to both confirm that the property is shared
amongst all instances, and also clears the object_class_property_*() prefix ready
for the introduction of class properties in subsequent patch series. This is taken
from one of my existing series to convert object properties to class properties, but
it seems convenient to include it here.

Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>


Mark Cave-Ayland (5):
  qom/object.c: introduce OBJECT_PROPERTY_SCALAR_GETTER(type) macro
  qom/object.c: introduce OBJECT_PROPERTY_SCALAR_SETTER(type) macro
  qom/object.c: introduce DEFINE_OBJECT_PROPERTY_SCALAR_METHODS() macro
  qom/object.h: add missing documentation for object_class_* property
    functions
  qom/object.c: rename object_class_property_uint*_ptr() to
    object_class_static_property_uint*_ptr()

 include/qom/object.h | 148 +++++++++++++++++++++++++++++++++++++++++--
 hw/riscv/spike.c     |   5 +-
 qom/object.c         | 126 ++++++++++++++----------------------
 3 files changed, 193 insertions(+), 86 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2026-07-17 13:12 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-17 11:19 [PATCH 0/5] qom: tidy-ups and preparation for class property conversion Mark Cave-Ayland
2026-07-17 11:19 ` [PATCH 1/5] qom/object.c: introduce OBJECT_PROPERTY_SCALAR_GETTER(type) macro Mark Cave-Ayland
2026-07-17 12:22   ` Daniel P. Berrangé
2026-07-17 11:19 ` [PATCH 2/5] qom/object.c: introduce OBJECT_PROPERTY_SCALAR_SETTER(type) macro Mark Cave-Ayland
2026-07-17 12:23   ` Daniel P. Berrangé
2026-07-17 11:19 ` [PATCH 3/5] qom/object.c: introduce DEFINE_OBJECT_PROPERTY_SCALAR_METHODS() macro Mark Cave-Ayland
2026-07-17 12:23   ` Daniel P. Berrangé
2026-07-17 11:19 ` [PATCH 4/5] qom/object.h: add missing documentation for object_class_* property functions Mark Cave-Ayland
2026-07-17 12:26   ` Daniel P. Berrangé
2026-07-17 12:56     ` Mark Cave-Ayland
2026-07-17 13:11       ` Daniel P. Berrangé
2026-07-17 11:19 ` [PATCH 5/5] qom/object.c: rename object_class_property_uint*_ptr() to object_class_static_property_uint*_ptr() Mark Cave-Ayland
2026-07-17 12:32   ` Daniel P. Berrangé
2026-07-17 12:58     ` Mark Cave-Ayland

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.