Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-04 Thread Anthony Liguori
On 02/04/2012 12:51 AM, Paolo Bonzini wrote: On 02/04/2012 04:03 AM, Anthony Liguori wrote: There's no object_ref() in qdev_device_add(). The 2 references come from adding a child link to /peripheral and via object_new(). Sure, but there's when the object_new() reference becomes unreachable. A

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Paolo Bonzini
On 02/04/2012 04:03 AM, Anthony Liguori wrote: There's no object_ref() in qdev_device_add(). The 2 references come from adding a child link to /peripheral and via object_new(). Sure, but there's when the object_new() reference becomes unreachable. At this point, if it weren't for /peripheral

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Anthony Liguori
On 02/03/2012 06:27 PM, Paolo Bonzini wrote: On 02/03/2012 03:27 PM, Anthony Liguori wrote: On 02/02/2012 10:45 AM, Paolo Bonzini wrote: The reference that is returned by qdev_device_add is never given back, so that device_del does not cause the refcount to go to zero (and thus does nothing).

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Paolo Bonzini
On 02/03/2012 03:27 PM, Anthony Liguori wrote: On 02/02/2012 10:45 AM, Paolo Bonzini wrote: The reference that is returned by qdev_device_add is never given back, so that device_del does not cause the refcount to go to zero (and thus does nothing). Signed-off-by: Paolo Bonzini This isn't need

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Anthony Liguori
On 02/03/2012 10:57 AM, Alexander Graf wrote: On 03.02.2012, at 17:37, Anthony Liguori wrote: On 02/02/2012 01:07 PM, Alexander Graf wrote: On 02.02.2012, at 20:01, Anthony Liguori wrote: On 02/02/2012 11:29 AM, Paolo Bonzini wrote: On 02/02/2012 06:03 PM, Anthony Liguori wrote: Is

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Alexander Graf
On 03.02.2012, at 17:37, Anthony Liguori wrote: > On 02/02/2012 01:07 PM, Alexander Graf wrote: >> >> On 02.02.2012, at 20:01, Anthony Liguori wrote: >> >>> On 02/02/2012 11:29 AM, Paolo Bonzini wrote: On 02/02/2012 06:03 PM, Anthony Liguori wrote: >> > > Is this still need

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Anthony Liguori
On 02/02/2012 01:07 PM, Alexander Graf wrote: On 02.02.2012, at 20:01, Anthony Liguori wrote: On 02/02/2012 11:29 AM, Paolo Bonzini wrote: On 02/02/2012 06:03 PM, Anthony Liguori wrote: Is this still needed with qom-upstream.14? I fixed a bug on .14 that involved child properties that was

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-03 Thread Anthony Liguori
On 02/02/2012 10:45 AM, Paolo Bonzini wrote: The reference that is returned by qdev_device_add is never given back, so that device_del does not cause the refcount to go to zero (and thus does nothing). Signed-off-by: Paolo Bonzini This isn't needed in qom-upstream.14. Here's why: object_init

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-02 Thread Alexander Graf
On 02.02.2012, at 21:03, Anthony Liguori wrote: > On 02/02/2012 01:07 PM, Alexander Graf wrote: >> >> On 02.02.2012, at 20:01, Anthony Liguori wrote: >> >>> On 02/02/2012 11:29 AM, Paolo Bonzini wrote: On 02/02/2012 06:03 PM, Anthony Liguori wrote: >> > > Is this still needed

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-02 Thread Anthony Liguori
On 02/02/2012 01:07 PM, Alexander Graf wrote: On 02.02.2012, at 20:01, Anthony Liguori wrote: On 02/02/2012 11:29 AM, Paolo Bonzini wrote: On 02/02/2012 06:03 PM, Anthony Liguori wrote: Is this still needed with qom-upstream.14? I fixed a bug on .14 that involved child properties that was

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-02 Thread Alexander Graf
On 02.02.2012, at 20:01, Anthony Liguori wrote: > On 02/02/2012 11:29 AM, Paolo Bonzini wrote: >> On 02/02/2012 06:03 PM, Anthony Liguori wrote: >>> >>> Is this still needed with qom-upstream.14? I fixed a bug on .14 that >>> involved child properties that was making device-del sometimes f

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-02 Thread Anthony Liguori
On 02/02/2012 11:29 AM, Paolo Bonzini wrote: On 02/02/2012 06:03 PM, Anthony Liguori wrote: Is this still needed with qom-upstream.14? I fixed a bug on .14 that involved child properties that was making device-del sometimes fail. Not sure, I tried with .13 but, from the look of it, it shoul

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-02 Thread Paolo Bonzini
On 02/02/2012 06:03 PM, Anthony Liguori wrote: Is this still needed with qom-upstream.14? I fixed a bug on .14 that involved child properties that was making device-del sometimes fail. Not sure, I tried with .13 but, from the look of it, it should still be there. Regarding the .13->.14 di

Re: [Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-02 Thread Anthony Liguori
On 02/02/2012 10:45 AM, Paolo Bonzini wrote: The reference that is returned by qdev_device_add is never given back, so that device_del does not cause the refcount to go to zero (and thus does nothing). Signed-off-by: Paolo Bonzini --- vl.c |1 + 1 files changed, 1 insertions(+), 0 deletio

[Qemu-devel] [PATCH 01/16] qdev: fix hot-unplug

2012-02-02 Thread Paolo Bonzini
The reference that is returned by qdev_device_add is never given back, so that device_del does not cause the refcount to go to zero (and thus does nothing). Signed-off-by: Paolo Bonzini --- vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index d88a18c..c