Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-05 Thread Eduardo Habkost
On Fri, Sep 05, 2014 at 02:42:48AM +, Gonglei (Arei) wrote: > > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > > Sent: Friday, September 05, 2014 10:20 AM > > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > > > On Fri, Sep 05, 2014 at 12:44:56AM +, Gong

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-04 Thread Gonglei (Arei)
> From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Friday, September 05, 2014 10:20 AM > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > On Fri, Sep 05, 2014 at 12:44:56AM +, Gonglei (Arei) wrote: > [...] > > > can we have a wrapper to reduce code > > >

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-04 Thread Eduardo Habkost
On Fri, Sep 05, 2014 at 12:44:56AM +, Gonglei (Arei) wrote: [...] > > can we have a wrapper to reduce code > > duplication? e.g. a: > > void device_add_bootindex_property(DeviceState *dev, int32_t *field, const > > char *suffix) > > function. > > > > Then instead of reimplementing set/get/fi

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-04 Thread Gonglei (Arei)
> Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > On Thu, Sep 04, 2014 at 03:01:41AM +, Gonglei (Arei) wrote: > > Hi, > > > > > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > > > Sent: Thursday, September 04, 2014 2:13 AM > > > Subject: Re: [PATCH v6 02/27]

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-04 Thread Eduardo Habkost
On Thu, Sep 04, 2014 at 03:01:41AM +, Gonglei (Arei) wrote: > Hi, > > > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > > Sent: Thursday, September 04, 2014 2:13 AM > > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > > > On Wed, Sep 03, 2014 at 06:45:56AM +

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-04 Thread Gonglei (Arei)
Hi, > > I've confirmed that this is a bug, and have posted a patch fix it. > > Please review, thanks! > > [PATCH] virtio-pci: fix virtio-net child refcount in transports > > Best regards, > -Gonglei So, about Gerd's previous question: > When hot-unplugging virtio-net-pci I'd expect we free b

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-04 Thread Gonglei (Arei)
> Subject: RE: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > Hi, > > > > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path > function > > > > > > On Wed, Sep 03, 2014 at 06:45:56AM +, Gonglei (Arei) wrote: > > > [...] > > > > > > 4. When we hotplug the virt

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-03 Thread Gonglei (Arei)
Hi, > > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > > > On Wed, Sep 03, 2014 at 06:45:56AM +, Gonglei (Arei) wrote: > > [...] > > > > > 4. When we hotplug the virtio-net-pci device, only pass > > > > > virtio-net-pci's > > pointer > > > > to > > > > > del_bo

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-03 Thread Gonglei (Arei)
Hi, > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Thursday, September 04, 2014 2:13 AM > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > On Wed, Sep 03, 2014 at 06:45:56AM +, Gonglei (Arei) wrote: > [...] > > > > 4. When we hotplug the virtio-net-

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-03 Thread Eduardo Habkost
On Wed, Sep 03, 2014 at 06:45:56AM +, Gonglei (Arei) wrote: [...] > > > 4. When we hotplug the virtio-net-pci device, only pass virtio-net-pci's > > > pointer > > to > > > del_boot_device_path(). But virtio-net-pci != virtio-net-device, so I add > > > a > > function > > > named is_same_fw_dev

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-02 Thread Gonglei (Arei)
Best regards, -Gonglei > -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Wednesday, September 03, 2014 2:25 PM > To: Gonglei (Arei) > Cc: Eduardo Habkost; qemu-devel@nongnu.org; aligu...@amazon.com; > m...@redhat.com; pbonz...@redhat.com; ak...@redhat.com;

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-02 Thread Gerd Hoffmann
Hi, > 4. When we hotplug the virtio-net-pci device, only pass virtio-net-pci's > pointer to > del_boot_device_path(). But virtio-net-pci != virtio-net-device, so I add a > function > named is_same_fw_dev_path() to handle this situation. When hot-unplugging virtio-net-pci I'd expect we free

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-02 Thread Gonglei (Arei)
> Subject: RE: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > Hi, > > > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > > Sent: Wednesday, September 03, 2014 2:00 AM > > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > Importance: High > > > >

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-02 Thread Gonglei (Arei)
Hi, > From: Eduardo Habkost [mailto:ehabk...@redhat.com] > Sent: Wednesday, September 03, 2014 2:00 AM > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > Importance: High > > On Mon, Sep 01, 2014 at 06:47:13AM +, Gonglei (Arei) wrote: > > > From: Gerd Hoffmann [mai

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-09-02 Thread Eduardo Habkost
On Mon, Sep 01, 2014 at 06:47:13AM +, Gonglei (Arei) wrote: > > From: Gerd Hoffmann [mailto:kra...@redhat.com] > > Sent: Monday, September 01, 2014 2:43 PM > > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > > Importance: High > > > > Hi, > > > > > +static bool

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-08-31 Thread Gonglei (Arei)
> From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, September 01, 2014 2:43 PM > Subject: Re: [PATCH v6 02/27] bootindex: add del_boot_device_path function > Importance: High > > Hi, > > > +static bool is_same_fw_dev_path(DeviceState *src, DeviceState *dst) > > +{ > > +bool ret

Re: [Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-08-31 Thread Gerd Hoffmann
Hi, > +static bool is_same_fw_dev_path(DeviceState *src, DeviceState *dst) > +{ > +bool ret = false; > +char *devpath_src = qdev_get_fw_dev_path(src); > +char *devpath_dst = qdev_get_fw_dev_path(dst); > + > +if (!strcmp(devpath_src, devpath_dst)) { > +ret = true; > +}

[Qemu-devel] [PATCH v6 02/27] bootindex: add del_boot_device_path function

2014-08-30 Thread arei.gonglei
From: Gonglei Introduce del_boot_device_path() to clean up fw_cfg content when hot-unplugging a device that refers to a bootindex. Signed-off-by: Gonglei Signed-off-by: Chenliang --- include/sysemu/sysemu.h | 1 + vl.c| 36 2 files cha