[Qemu-devel] [PATCH v4 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/20170714021509.23681-1-famz@redhat.com
Test FreeBSD passed
Test checkpatch passed
Test docker passed
Test s390x passed
exec.c                           | 27 +++++++++--------
hw/arm/armv7m.c                  | 16 +++-------
hw/arm/xlnx-zynqmp.c             |  7 ++---
hw/block/virtio-blk.c            |  6 ++--
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           | 16 +++-------
hw/intc/arm_gicv3_its_kvm.c      | 19 +++++-------
hw/ipmi/ipmi.c                   |  2 +-
hw/mem/pc-dimm.c                 | 30 +++++--------------
hw/misc/ivshmem.c                | 24 +++++----------
hw/misc/mips_cmgcr.c             | 16 +++-------
hw/net/xilinx_axienet.c          | 16 +++-------
hw/ppc/spapr_rng.c               |  8 ++---
hw/s390x/css.c                   |  4 +--
hw/s390x/s390-pci-bus.c          |  2 +-
hw/s390x/virtio-ccw.c            |  9 ------
hw/scsi/virtio-scsi.c            | 13 ++-------
hw/virtio/virtio-crypto-pci.c    |  2 --
hw/virtio/virtio-crypto.c        | 27 +++++------------
hw/virtio/virtio-pci.c           |  6 ----
hw/virtio/virtio-rng.c           | 12 +-------
include/hw/qdev-core.h           |  6 ++--
include/hw/qdev-properties.h     | 62 ++++++++++++++++++++++-----------------
include/hw/s390x/css.h           |  4 +--
include/qom/cpu.h                |  1 +
include/qom/object.h             |  6 ++--
qmp.c                            |  5 ++--
qom/cpu.c                        |  1 +
qom/object.c                     |  8 ++---
target/i386/cpu.c                |  2 +-
target/ppc/translate_init.c      |  2 +-
34 files changed, 193 insertions(+), 270 deletions(-)
[Qemu-devel] [PATCH v4 00/20] qdev: Introduce DEFINE_PROP_LINK
Posted by Fam Zheng 6 years, 9 months ago
v4: Add a pointer type param to DEFINE_PROP_LINK, don't change pointer types to
    "Object *". [Paolo]

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

 exec.c                           | 27 +++++++++--------
 hw/arm/armv7m.c                  | 16 +++-------
 hw/arm/xlnx-zynqmp.c             |  7 ++---
 hw/block/virtio-blk.c            |  6 ++--
 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           | 16 +++-------
 hw/intc/arm_gicv3_its_kvm.c      | 19 +++++-------
 hw/ipmi/ipmi.c                   |  2 +-
 hw/mem/pc-dimm.c                 | 30 +++++--------------
 hw/misc/ivshmem.c                | 24 +++++----------
 hw/misc/mips_cmgcr.c             | 16 +++-------
 hw/net/xilinx_axienet.c          | 16 +++-------
 hw/ppc/spapr_rng.c               |  8 ++---
 hw/s390x/css.c                   |  4 +--
 hw/s390x/s390-pci-bus.c          |  2 +-
 hw/s390x/virtio-ccw.c            |  9 ------
 hw/scsi/virtio-scsi.c            | 13 ++-------
 hw/virtio/virtio-crypto-pci.c    |  2 --
 hw/virtio/virtio-crypto.c        | 27 +++++------------
 hw/virtio/virtio-pci.c           |  6 ----
 hw/virtio/virtio-rng.c           | 12 +-------
 include/hw/qdev-core.h           |  6 ++--
 include/hw/qdev-properties.h     | 62 ++++++++++++++++++++++-----------------
 include/hw/s390x/css.h           |  4 +--
 include/qom/cpu.h                |  1 +
 include/qom/object.h             |  6 ++--
 qmp.c                            |  5 ++--
 qom/cpu.c                        |  1 +
 qom/object.c                     |  8 ++---
 target/i386/cpu.c                |  2 +-
 target/ppc/translate_init.c      |  2 +-
 34 files changed, 193 insertions(+), 270 deletions(-)

-- 
2.9.4


Re: [Qemu-devel] [PATCH v4 00/20] qdev: Introduce DEFINE_PROP_LINK
Posted by Paolo Bonzini 6 years, 9 months ago
On 14/07/2017 04:14, Fam Zheng wrote:
> v4: Add a pointer type param to DEFINE_PROP_LINK, don't change pointer types to
>     "Object *". [Paolo]
> 
> 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
> 
>  exec.c                           | 27 +++++++++--------
>  hw/arm/armv7m.c                  | 16 +++-------
>  hw/arm/xlnx-zynqmp.c             |  7 ++---
>  hw/block/virtio-blk.c            |  6 ++--
>  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           | 16 +++-------
>  hw/intc/arm_gicv3_its_kvm.c      | 19 +++++-------
>  hw/ipmi/ipmi.c                   |  2 +-
>  hw/mem/pc-dimm.c                 | 30 +++++--------------
>  hw/misc/ivshmem.c                | 24 +++++----------
>  hw/misc/mips_cmgcr.c             | 16 +++-------
>  hw/net/xilinx_axienet.c          | 16 +++-------
>  hw/ppc/spapr_rng.c               |  8 ++---
>  hw/s390x/css.c                   |  4 +--
>  hw/s390x/s390-pci-bus.c          |  2 +-
>  hw/s390x/virtio-ccw.c            |  9 ------
>  hw/scsi/virtio-scsi.c            | 13 ++-------
>  hw/virtio/virtio-crypto-pci.c    |  2 --
>  hw/virtio/virtio-crypto.c        | 27 +++++------------
>  hw/virtio/virtio-pci.c           |  6 ----
>  hw/virtio/virtio-rng.c           | 12 +-------
>  include/hw/qdev-core.h           |  6 ++--
>  include/hw/qdev-properties.h     | 62 ++++++++++++++++++++++-----------------
>  include/hw/s390x/css.h           |  4 +--
>  include/qom/cpu.h                |  1 +
>  include/qom/object.h             |  6 ++--
>  qmp.c                            |  5 ++--
>  qom/cpu.c                        |  1 +
>  qom/object.c                     |  8 ++---
>  target/i386/cpu.c                |  2 +-
>  target/ppc/translate_init.c      |  2 +-
>  34 files changed, 193 insertions(+), 270 deletions(-)
> 

I'm leaving the ARM patches to Peter and respinning my pull request with
the others.

Thanks,

Paolo

Re: [Qemu-devel] [PATCH v4 00/20] qdev: Introduce DEFINE_PROP_LINK
Posted by Peter Maydell 6 years, 9 months ago
On 14 July 2017 at 10:42, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 14/07/2017 04:14, Fam Zheng wrote:
>> v4: Add a pointer type param to DEFINE_PROP_LINK, don't change pointer types to
>>     "Object *". [Paolo]
>>
>> 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.

> I'm leaving the ARM patches to Peter and respinning my pull request with
> the others.

OK. Fam, you'll need to send a patchset with whatever the stuff
I need to pick up is, then (and it'll need to get to me by monday
given the freeze date is tuesday).

thanks
-- PMM