Skip to content

qom: Field properties type safety

Eduardo Habkost qemu-devel xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7sparc: Fix property/field size mismatch for iu-versiontarget/sparc/cpu.c target/sparc/cpu.h+3 -41 reply
2/7qom: Save size of struct field in Property structinclude/qom/field-property.h include/qom/property-types.h qom/property-types.c+5 -00 replies
3/7qdev: Don't register unreadable legacy propertieshw/core/qdev-properties.c+2 -20 replies
4/7qom: Replace void* parameter with Property* on field getters/settersbackends/tpm/tpm_util.c hw/block/xen-block.c hw/core/qdev-properties-system.c +7 more+105 -1601 reply
5/7qom: Replace void* parameter with Property* on PropertyInfo.releasebackends/tpm/tpm_util.c hw/core/qdev-properties-system.c include/qom/field-property.h +2 more+25 -110 replies
6/7qom: Add FIELD_PTR, a type-safe wrapper for object_field_prop_ptr()backends/tpm/tpm_util.c hw/block/xen-block.c hw/core/qdev-properties-system.c +6 more+89 -671 reply
7/7sparc: Use FIELD_PTR at nwindows getter/settertarget/sparc/cpu.c+4 -41 reply

Reviews trailers per patch

4 of 7 patches have a Reviewed-by or Acked-by.

PatchCornelia HuckMark Cave-Ayland
1/7A-b
2/7
3/7
4/7A-b
5/7
6/7A-b
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] qom: Field properties type safety

Based-on: [email protected]
Git branch: https://gitlab.com/ehabkost/qemu/-/commits/work/qdev-size-validation

This adds additional validation to field properties, to ensure the field property usage and implementation agree about the struct field size.

The first patch in the series fixes one bug found using the new safety mechanism. I hope it's the only one.

Eduardo Habkost (7):
sparc: Fix property/field size mismatch for iu-version
qom: Save size of struct field in Property struct
qdev: Don't register unreadable legacy properties
qom: Replace void* parameter with Property* on field getters/setters
qom: Replace void* parameter with Property* on PropertyInfo.release
qom: Add FIELD_PTR, a type-safe wrapper for object_field_prop_ptr()
sparc: Use FIELD_PTR at nwindows getter/setter

 include/qom/field-property-internal.h |   8 +-
 include/qom/field-property.h          |  61 ++++++++--
 include/qom/property-types.h          |   1 +
 target/sparc/cpu.h                    |   2 +-
 backends/tpm/tpm_util.c               |  18 ++-
 hw/block/xen-block.c                  |  10 +-
 hw/core/qdev-properties-system.c      | 140 +++++++++-------------
 hw/core/qdev-properties.c             |   4 +-
 hw/s390x/css.c                        |  10 +-
 hw/s390x/s390-pci-bus.c               |  10 +-
 hw/vfio/pci-quirks.c                  |  14 +--
 qom/field-property.c                  |  16 ++-
 qom/property-types.c                  | 166 +++++++++++---------------
 target/sparc/cpu.c                    |  17 ++-
 14 files changed, 231 insertions(+), 246 deletions(-)
Signature · 1 line
2.28.0