All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] hw/acpi: convert object props to class props
@ 2026-07-03 13:53 Mark Cave-Ayland
  2026-07-03 13:53 ` [PATCH v2 01/12] qom/object.c: rename object_class_property_uint*_ptr() to object_class_static_property_uint*_ptr() Mark Cave-Ayland
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Mark Cave-Ayland @ 2026-07-03 13:53 UTC (permalink / raw)
  To: mst, imammedo, anisinha, philmd, aurelien, peter.maydell,
	pbonzini, richard.henderson, berrange, qemu-devel, qemu-arm

[Background: based upon Peter's feedback at
 https://lists.gnu.org/archive/html/qemu-devel/2026-06/msg07717.html I realised
 that what we really need are object_class_property_add_*_ptr() equivalents to
 the existing object_property_add_*_ptr() functions to make it easier to
 convert existing properties.

 There are actually existing functions with these names that are already in use
 but after observation these are really static properties, so these are renamed
 to aid porting object props to class props, as well as making the difference
 clearer.]

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

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>

v2:
- Add object_class_property_add_*_ptr() functions matching the existing
  object_property_add_*_ptr() functions for class functions

- Rework patch to use new functions instead of manually adding get/set
  functions as part of the conversion

- Ignore existing R-Bs since this approach is quite different to v1

- Rebase onto master


Mark Cave-Ayland (12):
  qom/object.c: rename object_class_property_uint*_ptr() to
    object_class_static_property_uint*_ptr()
  qom/object.c: add object_class_property_add_uint8_ptr()
  qom/object.c: add object_class_property_add_uint16_ptr()
  qom/object.c: add object_class_property_add_uint32_ptr()
  qom/object.c: add object_class_property_add_uint64_ptr()
  hw/acpi/ich9.c: move initial property values into
    ich9_reset_properties()
  hw/isa/lpc_ich9.c: convert ich9_lpc_initfn() object props to class
    props
  hw/acpi/ich9.c: don't pass ICH9LPCPMRegs via opaque for
    ACPI_PM_PROP_GPE0_BLK prop
  hw/acpi/ich9.c: convert object props in ICH9_LPC_DEVICE to class props
  hw/acpi/pcihp.c: convert ACPI_PCIHP_IO_BASE_PROP and
    ACPI_PCIHP_IO_BASE_PROP to class props
  hw/acpi/pcihp.c: convert ACPI_PCIHP_PROP_BSEL from object prop to
    class prop
  hw/acpi/piix4.c: convert object props in PIIX4_PM to class props

 include/hw/acpi/ich9.h         |   4 +-
 include/hw/pci/pci_bus.h       |   2 +
 include/qom/object.h           |  20 ++++
 hw/acpi/generic_event_device.c |  10 ++
 hw/acpi/ich9.c                 |  79 ++++++++-----
 hw/acpi/pci-bridge.c           |   9 +-
 hw/acpi/pcihp.c                |  37 +++----
 hw/acpi/piix4.c                |  51 ++++++---
 hw/arm/virt-acpi-build.c       |   7 +-
 hw/i386/acpi-build.c           |   7 +-
 hw/isa/lpc_ich9.c              |  71 +++++++++---
 hw/pci/pci.c                   |  32 ++++++
 hw/riscv/spike.c               |   5 +-
 qom/object.c                   | 196 ++++++++++++++++++++++++++++++++-
 14 files changed, 440 insertions(+), 90 deletions(-)

-- 
2.43.0



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

end of thread, other threads:[~2026-07-08  9:25 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-03 13:53 [PATCH v2 00/12] hw/acpi: convert object props to class props Mark Cave-Ayland
2026-07-03 13:53 ` [PATCH v2 01/12] qom/object.c: rename object_class_property_uint*_ptr() to object_class_static_property_uint*_ptr() Mark Cave-Ayland
2026-07-07 12:05   ` Daniel P. Berrangé
2026-07-07 13:08     ` Mark Cave-Ayland
2026-07-07 13:19       ` Daniel P. Berrangé
2026-07-07 14:19       ` Peter Maydell
2026-07-08  9:24         ` Mark Cave-Ayland
2026-07-03 13:53 ` [PATCH v2 02/12] qom/object.c: add object_class_property_add_uint8_ptr() Mark Cave-Ayland
2026-07-07 12:17   ` Daniel P. Berrangé
2026-07-07 13:13     ` Mark Cave-Ayland
2026-07-07 13:20       ` Daniel P. Berrangé
2026-07-03 13:53 ` [PATCH v2 03/12] qom/object.c: add object_class_property_add_uint16_ptr() Mark Cave-Ayland
2026-07-03 13:53 ` [PATCH v2 04/12] qom/object.c: add object_class_property_add_uint32_ptr() Mark Cave-Ayland
2026-07-03 13:53 ` [PATCH v2 05/12] qom/object.c: add object_class_property_add_uint64_ptr() Mark Cave-Ayland
2026-07-03 13:53 ` [PATCH v2 06/12] hw/acpi/ich9.c: move initial property values into ich9_reset_properties() Mark Cave-Ayland
2026-07-06  7:06   ` Philippe Mathieu-Daudé
2026-07-03 13:53 ` [PATCH v2 07/12] hw/isa/lpc_ich9.c: convert ich9_lpc_initfn() object props to class props Mark Cave-Ayland
2026-07-03 13:53 ` [PATCH v2 08/12] hw/acpi/ich9.c: don't pass ICH9LPCPMRegs via opaque for ACPI_PM_PROP_GPE0_BLK prop Mark Cave-Ayland
2026-07-06  7:07   ` Philippe Mathieu-Daudé
2026-07-03 13:53 ` [PATCH v2 09/12] hw/acpi/ich9.c: convert object props in ICH9_LPC_DEVICE to class props Mark Cave-Ayland
2026-07-03 13:53 ` [PATCH v2 10/12] hw/acpi/pcihp.c: convert ACPI_PCIHP_IO_BASE_PROP and ACPI_PCIHP_IO_BASE_PROP " Mark Cave-Ayland
2026-07-03 13:53 ` [PATCH v2 11/12] hw/acpi/pcihp.c: convert ACPI_PCIHP_PROP_BSEL from object prop to class prop Mark Cave-Ayland
2026-07-03 13:53 ` [PATCH v2 12/12] hw/acpi/piix4.c: convert object props in PIIX4_PM to class props 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.