From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49346) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUe9V-0004r5-9Q for qemu-devel@nongnu.org; Wed, 16 May 2012 09:20:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SUe9S-000834-Ec for qemu-devel@nongnu.org; Wed, 16 May 2012 09:20:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SUe9S-00082c-60 for qemu-devel@nongnu.org; Wed, 16 May 2012 09:20:26 -0400 Date: Wed, 16 May 2012 16:20:17 +0300 From: "Michael S. Tsirkin" Message-ID: <20120516132017.GB8620@redhat.com> References: <1337095599-28836-1-git-send-email-anthony.perard@citrix.com> <1337095599-28836-2-git-send-email-anthony.perard@citrix.com> <20120515205222.GA12039@redhat.com> <4FB38E2E.5000508@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1/4] Introduce a new hotplug state: Force eject. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony PERARD Cc: Paolo Bonzini , Stefano Stabellini , QEMU-devel , Anthony Liguori , Xen Devel On Wed, May 16, 2012 at 12:37:54PM +0100, Anthony PERARD wrote: > On Wed, May 16, 2012 at 12:23 PM, Paolo Bonzini w= rote: > > Il 16/05/2012 13:15, Anthony PERARD ha scritto: > >>> > =A0 =A0 =A0 =A0 qdev_unplug(&(d->qdev), NULL); > >>> > + =A0 =A0 =A0 =A0qdev_free(&(d->qdev)); > >>> > =A0 =A0 } > >>> > =A0} > >>> > > >>> > > >>> > Anthony, can you confirm that this solves the problem for you? > >> This work until I try to hotplug a new device to the guest at wish > >> point I have this: > >> ERROR:/local/home/anthony/work/qemu/qom/object.c:389:object_delete: > >> assertion failed: (obj->ref =3D=3D 0) > >> > >> This is because there is still a pending request of the hotunplug in > >> the acpi piix4. > >> If I call qdev_free without qdev_unplug, I hit the same assert, but > >> rigth away. This is way something new. > > > > Because it's missing the object_unparent done by qdev_unplug. =A0Does > > object_unparent+qdev_free work? =A0(I believe object_unparent should = be > > done by qdev_free rather than qdev_unplug, but that's something for 1= .2). >=20 > Cool, this seems to work fine. Thanks. >=20 > I'll test a bit more and resend a patch with only object_unparent+qdev_= free. Separately it was suggested to make qdev_free do object_unparent automatically. Anthony is yet to respond. > --=20 > Anthony PERARD