Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-29 Thread Gonglei (Arei)
> > > > > > > > Hm... > > > > > > > > void virtio_instance_init_common(Object *proxydev, > > > > DeviceState *vdev, > > > > size_t vdevsize, > > > > const char *vdevname) > > > > { > > > > object_

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-29 Thread Cornelia Huck
On Mon, 29 Sep 2014 15:33:32 +0300 "Michael S. Tsirkin" wrote: > On Mon, Sep 29, 2014 at 12:09:06PM +, Gonglei (Arei) wrote: > > > From: Cornelia Huck [mailto:cornelia.h...@de.ibm.com] > > > Sent: Monday, September 29, 2014 6:53 PM > > > Subject: Re: [PATCH RESEND 0/9] virtio: fix virtio chil

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-29 Thread Gonglei (Arei)
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Monday, September 29, 2014 8:32 PM > Subject: Re: [PATCH RESEND 0/9] virtio: fix virtio child recount in transports > > Il 29/09/2014 12:53, Cornelia Huck ha scritto: > > void virtio_instance_init_common(Object *proxydev, > >

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-29 Thread Paolo Bonzini
Il 29/09/2014 12:53, Cornelia Huck ha scritto: > void virtio_instance_init_common(Object *proxydev, > DeviceState *vdev, > size_t vdevsize, > const char *vdevname) > { > object_initialize(vdev, vd

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-29 Thread Michael S. Tsirkin
On Mon, Sep 29, 2014 at 12:09:06PM +, Gonglei (Arei) wrote: > > From: Cornelia Huck [mailto:cornelia.h...@de.ibm.com] > > Sent: Monday, September 29, 2014 6:53 PM > > Subject: Re: [PATCH RESEND 0/9] virtio: fix virtio child recount in > > transports > > > > On Sat, 27 Sep 2014 10:37:23 +

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-29 Thread Gonglei (Arei)
> From: Cornelia Huck [mailto:cornelia.h...@de.ibm.com] > Sent: Monday, September 29, 2014 7:33 PM > Subject: Re: [PATCH RESEND 0/9] virtio: fix virtio child recount in transports > > On Fri, 26 Sep 2014 16:45:38 +0800 > wrote: > > > Gonglei (9): > > virtio-net: use aliases instead of duplicat

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-29 Thread Gonglei (Arei)
> From: Cornelia Huck [mailto:cornelia.h...@de.ibm.com] > Sent: Monday, September 29, 2014 6:53 PM > Subject: Re: [PATCH RESEND 0/9] virtio: fix virtio child recount in transports > > On Sat, 27 Sep 2014 10:37:23 + > "Gonglei (Arei)" wrote: > > > > > One thing I noticed is that the various d

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-29 Thread Cornelia Huck
On Fri, 26 Sep 2014 16:45:38 +0800 wrote: > Gonglei (9): > 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-sc

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-29 Thread Cornelia Huck
On Sat, 27 Sep 2014 10:37:23 + "Gonglei (Arei)" wrote: > > > 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",

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-27 Thread Gonglei (Arei)
> > > 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 >

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-26 Thread Gonglei (Arei)
Hi, > > > > virtio-$device-{pci, s390, ccw} all duplicate the > > qdev properties of their virtio child. This approach does > > not work well with string or pointer properties since we > > must be careful about leaking or double-freeing them. > > > > Use the QOM alias property to forward property

Re: [Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-26 Thread Cornelia Huck
On Fri, 26 Sep 2014 16:45:38 +0800 wrote: > From: Gonglei > > virtio-$device-{pci, s390, ccw} all duplicate the > qdev properties of their virtio child. This approach does > not work well with string or pointer properties since we > must be careful about leaking or double-freeing them. > > Use

[Qemu-devel] [PATCH RESEND 0/9] virtio: fix virtio child recount in transports

2014-09-26 Thread arei.gonglei
From: Gonglei virtio-$device-{pci, s390, ccw} all duplicate the qdev properties of their virtio child. This approach does not work well with string or pointer properties since we must be careful about leaking or double-freeing them. Use the QOM alias property to forward property accesses to the