All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/8] hw/i386: convert object props to class props
@ 2026-09-02 14:40 Mark Cave-Ayland
  2026-09-02 14:40 ` [PATCH v3 1/8] qom/object.c: introduce object_alias_get_targetp() lookup function Mark Cave-Ayland
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Mark Cave-Ayland @ 2026-09-02 14:40 UTC (permalink / raw)
  To: pbonzini, richard.henderson, mst, mtosatti, marcandre.lureau,
	armbru, qemu-devel

Since the use of object props is effectively deprecated, here is an attempt
to convert all use of object props in hw/i386 to class props. The eventual
aim is to continue working through the codebase, removing all remaining uses
of object props.

In order to facilitate the conversion of alias properties, this series
introduces a couple of new QOM functions: object_class_property_add_alias()
and object_property_set_alias() to declare the property and to set it within
an instance accordingly. This implementation is hugely inspired by the
existing link class property code: many thanks to Marc-André for doing this
initial work.

The series is lightly tested: it passes "make check", GitLab CI and some
simple local tests. I'm mostly interested for feedback on the conversion
strategy, and to get a feel for the best way to merge this series since once
the basic conversion patterns are in place, the same patterns can be applied
elsewhere and it would be good to minimise the merge window for such changes.

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

(Patches still needing review: 1-4)

v3:
- Rebase onto master

- Add R-B tags from Phil

- Add kernel-doc to patch 2 for the object_class_property_add_alias() function

- Update refcounting for alias class properties according to the description
  in the kernel-doc for object_property_set_alias() which is taken from
  the existing object_property_add_alias() kernel-doc


v2:
- Rebase onto master

- Add R-B tags from Daniel

- Update comment on patch 7 to explicitly describe the change in behaviour
  of the pflash0 and pflash1 PC machine properties


Mark Cave-Ayland (8):
  qom/object.c: introduce object_alias_get_targetp() lookup function
  qom/object.c: introduce object_class_property_add_alias()
  qom/object.c: introduce object_property_set_alias() function
  hw/i386/pc.c: convert pcspk-audiodev object prop to a class prop
  hw/i386/pc.c: convert rtc-time object prop to a class prop
  hw/i386/pc.c: convert PC_MACHINE_ACPI_DEVICE_PROP from object prop to
    class prop
  hw/i386/pc_sysfw.c: convert pflash0 and pflash1 object props to class
    props
  hw/i386/sgx-epc.c: convert SGX_EPC_SIZE_PROP object prop to class prop

 include/hw/i386/pc.h |   5 ++
 include/qom/object.h |  42 +++++++++++++
 hw/i386/pc.c         |  29 +++++++--
 hw/i386/pc_piix.c    |   5 --
 hw/i386/pc_q35.c     |   5 --
 hw/i386/pc_sysfw.c   |   7 +--
 hw/i386/sgx-epc.c    |  12 ++--
 qom/object.c         | 146 ++++++++++++++++++++++++++++++++++++++++---
 8 files changed, 213 insertions(+), 38 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2026-09-21 13:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-02 14:40 [PATCH v3 0/8] hw/i386: convert object props to class props Mark Cave-Ayland
2026-09-02 14:40 ` [PATCH v3 1/8] qom/object.c: introduce object_alias_get_targetp() lookup function Mark Cave-Ayland
2026-09-02 14:40 ` [PATCH v3 2/8] qom/object.c: introduce object_class_property_add_alias() Mark Cave-Ayland
2026-09-17  8:52   ` Marc-André Lureau
2026-09-18  8:38     ` Mark Cave-Ayland
2026-09-18  9:04       ` Markus Armbruster
2026-09-21  9:06         ` Daniel P. Berrangé
2026-09-21 13:28           ` Markus Armbruster
2026-09-02 14:40 ` [PATCH v3 3/8] qom/object.c: introduce object_property_set_alias() function Mark Cave-Ayland
2026-09-02 14:40 ` [PATCH v3 4/8] hw/i386/pc.c: convert pcspk-audiodev object prop to a class prop Mark Cave-Ayland
2026-09-02 21:08   ` Philippe Mathieu-Daudé
2026-09-02 14:40 ` [PATCH v3 5/8] hw/i386/pc.c: convert rtc-time " Mark Cave-Ayland
2026-09-02 14:40 ` [PATCH v3 6/8] hw/i386/pc.c: convert PC_MACHINE_ACPI_DEVICE_PROP from object prop to " Mark Cave-Ayland
2026-09-02 14:40 ` [PATCH v3 7/8] hw/i386/pc_sysfw.c: convert pflash0 and pflash1 object props to class props Mark Cave-Ayland
2026-09-02 14:40 ` [PATCH v3 8/8] hw/i386/sgx-epc.c: convert SGX_EPC_SIZE_PROP object prop to class prop 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.