[Qemu-devel] [PATCH v3 00/20] qdev: Introduce DEFINE_PROP_LINK

Fam Zheng posted 20 patches 6 years, 9 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170704064347.7022-1-famz@redhat.com
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
There is a newer version of this series
cpus.c                                 |  5 +--
exec.c                                 | 30 ++++++++--------
hw/arm/armv7m.c                        | 20 ++++-------
hw/arm/xlnx-zynqmp.c                   | 12 +++----
hw/block/dataplane/virtio-blk.c        |  2 +-
hw/block/virtio-blk.c                  |  5 +--
hw/core/qdev-properties-system.c       |  8 ++---
hw/core/qdev-properties.c              | 63 ++++++++++++++++++++++------------
hw/core/qdev.c                         | 31 ++++++++++-------
hw/display/xlnx_dp.c                   |  2 +-
hw/dma/xilinx_axidma.c                 | 26 ++++++--------
hw/intc/arm_gicv3_its_kvm.c            | 18 ++++------
hw/ipmi/ipmi.c                         |  2 +-
hw/mem/nvdimm.c                        | 11 +++---
hw/mem/pc-dimm.c                       | 42 ++++++++---------------
hw/misc/ivshmem.c                      | 34 +++++++-----------
hw/misc/mips_cmgcr.c                   | 22 ++++--------
hw/net/xilinx_axienet.c                | 31 +++++++----------
hw/ppc/spapr_rng.c                     | 13 +++----
hw/s390x/css.c                         |  4 +--
hw/s390x/s390-pci-bus.c                |  2 +-
hw/s390x/virtio-ccw.c                  |  9 -----
hw/scsi/virtio-scsi-dataplane.c        |  2 +-
hw/scsi/virtio-scsi.c                  | 13 ++-----
hw/virtio/virtio-crypto-pci.c          |  2 --
hw/virtio/virtio-crypto.c              | 56 ++++++++++--------------------
hw/virtio/virtio-pci.c                 |  6 ----
hw/virtio/virtio-rng.c                 | 14 ++------
include/hw/arm/armv7m.h                |  5 +--
include/hw/arm/xlnx-zynqmp.h           |  3 +-
include/hw/intc/arm_gicv3_its_common.h |  3 +-
include/hw/mem/pc-dimm.h               |  3 +-
include/hw/misc/mips_cmgcr.h           |  5 +--
include/hw/qdev-core.h                 |  6 ++--
include/hw/qdev-properties.h           | 62 +++++++++++++++++++--------------
include/hw/s390x/css.h                 |  4 +--
include/hw/virtio/virtio-blk.h         |  3 +-
include/hw/virtio/virtio-crypto.h      |  3 +-
include/hw/virtio/virtio-rng.h         |  3 +-
include/hw/virtio/virtio-scsi.h        |  3 +-
include/qom/cpu.h                      |  4 ++-
include/qom/object.h                   |  6 ++--
qmp.c                                  |  5 +--
qom/cpu.c                              |  1 +
qom/object.c                           |  8 ++---
target/arm/cpu.c                       |  6 ++--
target/i386/cpu.c                      |  7 ++--
target/ppc/translate_init.c            |  2 +-
48 files changed, 282 insertions(+), 345 deletions(-)
[Qemu-devel] [PATCH v3 00/20] qdev: Introduce DEFINE_PROP_LINK
Posted by Fam Zheng 6 years, 9 months ago
v3: Include Igor's patch, and fix virtio-crypto too.
    Always use qdev_prop_allow_set_link_before_realize and
    OBJ_PROP_LINK_UNREF_ON_RELEASE.
    Include as many applicable devices as possible and some more clean-ups.
    There are still more left but they use uncommon check and flags parameters,
    it's better to take care of them in following batches.

v2: Create a new header for link properties. [Paolo]
    Don't wrap, use PropertyInfo.create() (much better diffstat, yay!).
    [Paolo]

Link properties of devices created with object_property_add_link() are not
reflected in HMP "info qtree". For example, whether a virtio-blk device has an
iothread (i.e. has enabled data plane) can not be introspected easily.

Introduce a new type of qdev property macro to fix that.

Fam Zheng (19):
  qdev: Introduce PropertyInfo.create
  qdev: Introduce DEFINE_PROP_LINK
  qmp: Use ObjectProperty.type if present
  qdev: Add const qualifier to PropertyInfo definitions
  virtio-blk: Convert to DEFINE_PROP_LINK
  virtio-scsi: Convert to DEFINE_PROP_LINK
  virtio-rng: Convert to DEFINE_PROP_LINK
  virtio-crypto: Convert to DEFINE_PROP_LINK
  dimm: Convert to DEFINE_PROP_LINK
  ivshmem: Convert to DEFINE_PROP_LINK
  armv7m: Convert bitband.source-mamory to DEFINE_PROP_LINK
  armv7m: Convert armv7m.memory to DEFINE_PROP_LINK
  gicv3: Convert to DEFINE_PROP_LINK
  xlnx_zynqmp: Convert to DEFINE_PROP_LINK
  xilinx_axienet: Convert to DEFINE_PROP_LINK
  xilinx_axidma: Convert to DEFINE_PROP_LINK
  mips_cmgcr: Convert to DEFINE_PROP_LINK
  cpu: Convert to DEFINE_PROP_LINK
  spapr_rng: Convert to DEFINE_PROP_LINK

Igor Mammedov (1):
  qom: enforce readonly nature of link's check callback

 cpus.c                                 |  5 +--
 exec.c                                 | 30 ++++++++--------
 hw/arm/armv7m.c                        | 20 ++++-------
 hw/arm/xlnx-zynqmp.c                   | 12 +++----
 hw/block/dataplane/virtio-blk.c        |  2 +-
 hw/block/virtio-blk.c                  |  5 +--
 hw/core/qdev-properties-system.c       |  8 ++---
 hw/core/qdev-properties.c              | 63 ++++++++++++++++++++++------------
 hw/core/qdev.c                         | 31 ++++++++++-------
 hw/display/xlnx_dp.c                   |  2 +-
 hw/dma/xilinx_axidma.c                 | 26 ++++++--------
 hw/intc/arm_gicv3_its_kvm.c            | 18 ++++------
 hw/ipmi/ipmi.c                         |  2 +-
 hw/mem/nvdimm.c                        | 11 +++---
 hw/mem/pc-dimm.c                       | 42 ++++++++---------------
 hw/misc/ivshmem.c                      | 34 +++++++-----------
 hw/misc/mips_cmgcr.c                   | 22 ++++--------
 hw/net/xilinx_axienet.c                | 31 +++++++----------
 hw/ppc/spapr_rng.c                     | 13 +++----
 hw/s390x/css.c                         |  4 +--
 hw/s390x/s390-pci-bus.c                |  2 +-
 hw/s390x/virtio-ccw.c                  |  9 -----
 hw/scsi/virtio-scsi-dataplane.c        |  2 +-
 hw/scsi/virtio-scsi.c                  | 13 ++-----
 hw/virtio/virtio-crypto-pci.c          |  2 --
 hw/virtio/virtio-crypto.c              | 56 ++++++++++--------------------
 hw/virtio/virtio-pci.c                 |  6 ----
 hw/virtio/virtio-rng.c                 | 14 ++------
 include/hw/arm/armv7m.h                |  5 +--
 include/hw/arm/xlnx-zynqmp.h           |  3 +-
 include/hw/intc/arm_gicv3_its_common.h |  3 +-
 include/hw/mem/pc-dimm.h               |  3 +-
 include/hw/misc/mips_cmgcr.h           |  5 +--
 include/hw/qdev-core.h                 |  6 ++--
 include/hw/qdev-properties.h           | 62 +++++++++++++++++++--------------
 include/hw/s390x/css.h                 |  4 +--
 include/hw/virtio/virtio-blk.h         |  3 +-
 include/hw/virtio/virtio-crypto.h      |  3 +-
 include/hw/virtio/virtio-rng.h         |  3 +-
 include/hw/virtio/virtio-scsi.h        |  3 +-
 include/qom/cpu.h                      |  4 ++-
 include/qom/object.h                   |  6 ++--
 qmp.c                                  |  5 +--
 qom/cpu.c                              |  1 +
 qom/object.c                           |  8 ++---
 target/arm/cpu.c                       |  6 ++--
 target/i386/cpu.c                      |  7 ++--
 target/ppc/translate_init.c            |  2 +-
 48 files changed, 282 insertions(+), 345 deletions(-)

-- 
2.9.4