[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in
From: |
Gonglei (Arei) |
Subject: |
Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports |
Date: |
Sat, 27 Sep 2014 10:37:23 +0000 |
> > > virtio-net: use aliases instead of duplicate qdev properties
> > > virtio: fix virtio-net child refcount in transports
> > > virtio/vhost scsi: use aliases instead of duplicate qdev properties
> > > virtio/vhost-scsi: fix virtio-scsi/vhost-scsi child refcount in
> > > transports
> > > virtio-serial: use aliases instead of duplicate qdev properties
> > > virtio-serial: fix virtio-serial child refcount in transports
> > > virtio-rng: use aliases instead of duplicate qdev properties
> > > virtio-rng: fix virtio-rng child refcount in transports
> > > virtio-balloon: fix virtio-balloon child refcount in transports
> > >
> > > hw/s390x/s390-virtio-bus.c | 16 ++++++++++------
> > > hw/s390x/virtio-ccw.c | 18 +++++++++++-------
> > > hw/virtio/virtio-pci.c | 18 +++++++++++-------
> > > 3 files changed, 32 insertions(+), 20 deletions(-)
> >
> > One thing I noticed is that the various devices end up with similar
> > code in the end:
> >
> > object_initialize(&dev->vdev, sizeof(dev->vdev), TYPE_WHATEVER);
> > object_property_add_child(obj, "virtio-backend",
> OBJECT(&dev->vdev),
> > NULL);
> > object_unref(OBJECT(&dev->vdev));
> > qdev_alias_all_properties(DEVICE(&dev->vdev), obj);
> >
> > Would it make sense to add a helper function for that?
>
Sorry, I'm afraid this is not helpful. Because dev and dev->vdev is different
for different virtio devices, like VirtIOBlkPCI(and its vdev is VirtIOBlock),
VirtIONetPCI(and its vdev is VirtIONet). They have no the same parameters
for above code segment. :)
Best regards,
-Gonglei
- [Qemu-devel] [PATCH RESEND 3/9] virtio/vhost scsi: use aliases instead of duplicate qdev properties, (continued)
- [Qemu-devel] [PATCH RESEND 3/9] virtio/vhost scsi: use aliases instead of duplicate qdev properties, arei.gonglei, 2014/09/26
- [Qemu-devel] [PATCH RESEND 9/9] virtio-balloon: fix virtio-balloon child refcount in transports, arei.gonglei, 2014/09/26
- [Qemu-devel] [PATCH RESEND 7/9] virtio-rng: use aliases instead of duplicate qdev properties, arei.gonglei, 2014/09/26
- [Qemu-devel] [PATCH RESEND 5/9] virtio-serial: use aliases instead of duplicate qdev properties, arei.gonglei, 2014/09/26
- [Qemu-devel] [PATCH RESEND 4/9] virtio/vhost-scsi: fix virtio-scsi/vhost-scsi child refcount in transports, arei.gonglei, 2014/09/26
- [Qemu-devel] [PATCH RESEND 8/9] virtio-rng: fix virtio-rng child refcount in transports, arei.gonglei, 2014/09/26
- [Qemu-devel] [PATCH RESEND 1/9] virtio-net: use aliases instead of duplicate qdev properties, arei.gonglei, 2014/09/26
- [Qemu-devel] [PATCH RESEND 6/9] virtio-serial: fix virtio-serial child refcount in transports, arei.gonglei, 2014/09/26
- Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports, Cornelia Huck, 2014/09/26
- Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports, Gonglei (Arei), 2014/09/27
- Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports,
Gonglei (Arei) <=
- Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports, Cornelia Huck, 2014/09/29
- Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports, Gonglei (Arei), 2014/09/29
- Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports, Michael S. Tsirkin, 2014/09/29
- Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports, Cornelia Huck, 2014/09/29
- Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports, Gonglei (Arei), 2014/09/29
- Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports, Paolo Bonzini, 2014/09/29
- Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports, Gonglei (Arei), 2014/09/29
Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports, Cornelia Huck, 2014/09/29