[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
- [PATCH 0/7] qom: Field properties type safety,
Eduardo Habkost <=
- [PATCH 1/7] sparc: Fix property/field size mismatch for iu-version, Eduardo Habkost, 2020/11/04
- [PATCH 2/7] qom: Save size of struct field in Property struct, Eduardo Habkost, 2020/11/04
- [PATCH 3/7] qdev: Don't register unreadable legacy properties, Eduardo Habkost, 2020/11/04
- [PATCH 5/7] qom: Replace void* parameter with Property* on PropertyInfo.release, Eduardo Habkost, 2020/11/04
- [PATCH 4/7] qom: Replace void* parameter with Property* on field getters/setters, Eduardo Habkost, 2020/11/04
- [PATCH 6/7] qom: Add FIELD_PTR, a type-safe wrapper for object_field_prop_ptr(), Eduardo Habkost, 2020/11/04
- [PATCH 7/7] sparc: Use FIELD_PTR at nwindows getter/setter, Eduardo Habkost, 2020/11/04