From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mq2Sv-00023H-Hh for qemu-devel@nongnu.org; Tue, 22 Sep 2009 06:19:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mq2Sq-0001zC-IJ for qemu-devel@nongnu.org; Tue, 22 Sep 2009 06:19:20 -0400 Received: from [199.232.76.173] (port=35672 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mq2Sp-0001yw-UR for qemu-devel@nongnu.org; Tue, 22 Sep 2009 06:19:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37658) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mq2Sp-00037A-GS for qemu-devel@nongnu.org; Tue, 22 Sep 2009 06:19:15 -0400 Message-ID: <4AB8A49E.3060501@redhat.com> Date: Tue, 22 Sep 2009 12:19:10 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 09/13] Add exit callback to DeviceInfo. References: <1253611767-6483-1-git-send-email-kraxel@redhat.com> <1253611767-6483-10-git-send-email-kraxel@redhat.com> <200909221206.22716.Christoph.Egger@amd.com> In-Reply-To: <200909221206.22716.Christoph.Egger@amd.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Egger Cc: qemu-devel@nongnu.org On 09/22/09 12:06, Christoph Egger wrote: > On Tuesday 22 September 2009 11:29:23 Gerd Hoffmann wrote: >> This adds a exit callback for device destruction to DeviceInfo, so >> we can hook cleanups into qdev device destruction. > > This is not enough. > You need a childexit to allow devices to cleanup their children > in the device tree first. qdev will do that for you. Check out patch #8 and the new qbus_free() function added there. Of course the bus implementations must make use of the exit hook so it actually works, the following patches do that for pci, scsi and usb. cheers, Gerd