[Qemu-devel] [PATCH 0/7] qdev: Introduce DEFINE_PROP_LINK

Fam Zheng posted 7 patches 6 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170628124850.12821-1-famz@redhat.com
Test FreeBSD passed
There is a newer version of this series
hw/block/dataplane/virtio-blk.c |  2 +-
hw/block/virtio-blk.c           |  7 ++--
hw/core/qdev-properties.c       | 81 +++++++++++++++++++++++++++++++++++++++++
hw/scsi/virtio-scsi-dataplane.c |  2 +-
hw/scsi/virtio-scsi.c           | 15 ++------
hw/virtio/virtio-pci.c          |  6 ---
hw/virtio/virtio-rng.c          | 16 ++------
include/hw/qdev-core.h          |  3 ++
include/hw/qdev-properties.h    | 11 ++++++
include/hw/virtio/virtio-blk.h  |  2 +-
include/hw/virtio/virtio-rng.h  |  2 +-
include/hw/virtio/virtio-scsi.h |  2 +-
include/qom/object.h            | 14 +++++++
qom/object.c                    | 24 ++++++------
14 files changed, 136 insertions(+), 51 deletions(-)
[Qemu-devel] [PATCH 0/7] qdev: Introduce DEFINE_PROP_LINK
Posted by Fam Zheng 6 years, 10 months ago
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 to fix that.

Because QOM is not my most familiar area, only virtio devices are converted in
this version. If the new API is okay, other devices can be worked on either in
v2 or in a follow up series.

Fam Zheng (7):
  qom: Make link property API public
  qom: Handle property lookup failure in object_resolve_link
  qom: Save type name in LinkProperty
  qdev: Introduce DEFINE_PROP_LINK
  virtio-blk: Use DEFINE_PROP_LINK
  virtio-scsi: Use DEFINE_PROP_LINK
  virtio-rng: Use DEFINE_PROP_LINK

 hw/block/dataplane/virtio-blk.c |  2 +-
 hw/block/virtio-blk.c           |  7 ++--
 hw/core/qdev-properties.c       | 81 +++++++++++++++++++++++++++++++++++++++++
 hw/scsi/virtio-scsi-dataplane.c |  2 +-
 hw/scsi/virtio-scsi.c           | 15 ++------
 hw/virtio/virtio-pci.c          |  6 ---
 hw/virtio/virtio-rng.c          | 16 ++------
 include/hw/qdev-core.h          |  3 ++
 include/hw/qdev-properties.h    | 11 ++++++
 include/hw/virtio/virtio-blk.h  |  2 +-
 include/hw/virtio/virtio-rng.h  |  2 +-
 include/hw/virtio/virtio-scsi.h |  2 +-
 include/qom/object.h            | 14 +++++++
 qom/object.c                    | 24 ++++++------
 14 files changed, 136 insertions(+), 51 deletions(-)

-- 
2.9.4