qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Gonglei (Arei)
Subject: Re: [Qemu-devel] [PATCH v2 0/9] virtio: fix virtio child recount in transports
Date: Fri, 19 Sep 2014 09:52:32 +0000

Hi, Michael, Paolo and Markus

This patch series fix an obvious resource leak issue about virtio devices.
Maybe those should be merged in qemu-stable tree IMHO.
But the patch serial using property_alias function which 
introduce a regression (-device FOO,?) such as:

before:
virtio-blk-pci.physical_block_size=blocksize
virtio-blk-pci.logical_block_size=blocksize
virtio-blk-pci.drive=drive
virtio-net-pci.netdev=netdev
virtio-net-pci.vlan=vlan
virtio-net-pci.mac=macaddr

after:
virtio-blk-pci.physical_block_size=uint16
virtio-blk-pci.logical_block_size=uint16
virtio-blk-pci.drive=str
virtio-net-pci.netdev=str
virtio-net-pci.vlan=int32
virtio-net-pci.mac=str

So, I posted a patch series:
 [PATCH v2 0/3] Fix confused output for alias properties

which to fix the output regression. But Paolo said this fixing way
is layering violation. Now, it seems that the both seriaes are stagnant.

What's your opinion? Thanks a lot!
Does this patch series can be merged firstly?

Best regards,
-Gonglei


> -----Original Message-----
> From: Gonglei (Arei)
> Sent: Tuesday, September 09, 2014 2:35 PM
> To: address@hidden
> Cc: address@hidden; address@hidden; address@hidden;
> Huangweidong (C); address@hidden; Huangpeng (Peter); address@hidden;
> address@hidden; address@hidden; Luonengjun; Gonglei
> (Arei)
> Subject: [PATCH v2 0/9] virtio: fix virtio child recount in transports
> 
> From: Gonglei <address@hidden>
> 
> 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
> VirtIORNG child.  This way no duplication is necessary.
> 
> For their child, object_initialize() leaves the object with a refcount of 1.
> object_property_add_child() adds its own reference which is dropped
> again when the property is deleted.
> 
> The upshot of this is that we always have a refcount >= 1.  Upon hot
> unplug the virtio-$device child is not finalized!
> 
> Drop our reference after the child property has been added to the
> parent.
> 
> The v1 as below:
>  http://lists.gnu.org/archive/html/qemu-devel/2014-09/msg01208.html
> 
> Changes since v1:
>  1. using alias properties avoid to double-free property.(Stefan)
>  2. add handling all other virtio-devices had the same probleam.
>  3. same handling for CCW and s390-virito.
> 
> Acknowledgements:
>  I copied Stefan's commit message about virtio-blk which summarized
>  reasons very well, I cannot agree more with him. Holp Stefan do not
>  mind, thank you so much!
> 
> 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-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(-)
> 
> --
> 1.7.12.4
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]