qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eduardo Habkost
Subject: [PATCH 0/7] qom: Field properties type safety
Date: Wed, 4 Nov 2020 12:25:05 -0500

Based-on: 20201104160021.2342108-1-ehabkost@redhat.com
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(-)

-- 
2.28.0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]