Skip to content

RFC qdev-properties: Try to improve use of dynamic property introspection

Philippe Mathieu-Daudé qemu-arm qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5qdev-properties: Add qdev_property_del_static()hw/core/qdev-properties.c include/hw/qdev-properties.h+9 -00 replies
2/5qdev-properties: Add OptionalBool QAPI typehw/core/qdev-properties.c include/hw/qdev-properties.h qapi/common.json+31 -02 replies
3/5hw/arm/armv7m: Convert ARMv7MState::vfp from bool to OptionalBoolhw/arm/armsse.c hw/arm/armv7m.c include/hw/arm/armv7m.h+3 -30 replies
4/5hw/arm/armv7m: Error if trying to set unavailable ARMCPU::vfp propertyhw/arm/armv7m.c+3 -01 reply
5/5hw/arm/armv7m: Do not expose 'vfp' property if ARM CPU doesn't have ithw/arm/armv7m.c+8 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/5] qdev-properties: Try to improve use of dynamic property introspection

Hi,

This RFC series tries to work over some limitations exposed in
https://lore.kernel.org/qemu-devel/[email protected]/

Eventually all QDev objects would use static QOM properties, but in some cases we can not. ARMv7MState is a such example adding properties that might end up irrelevant.

This is just an example, but thinking long term (in particular in the context of dynamic machines) I'm looking at how this could be improved. Thus this series. I don't like much this current approach (because more boiler place and complexity) however this seems to DTRT for the user.

Philippe Mathieu-Daudé (5):
qdev-properties: Add qdev_property_del_static()
qdev-properties: Add OptionalBool QAPI type
hw/arm/armv7m: Convert ARMv7MState::vfp from bool to OptionalBool hw/arm/armv7m: Error if trying to set unavailable ARMCPU::vfp property hw/arm/armv7m: Do not expose 'vfp' property if ARM CPU doesn't have it

 qapi/common.json             | 16 ++++++++++++++++
 include/hw/arm/armv7m.h      |  2 +-
 include/hw/qdev-properties.h |  7 +++++++
 hw/arm/armsse.c              |  2 +-
 hw/arm/armv7m.c              | 12 +++++++++++-
 hw/core/qdev-properties.c    | 17 +++++++++++++++++
 6 files changed, 53 insertions(+), 3 deletions(-)
Signature · 1 line
2.41.0