From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrGh1-0006Iu-QL for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:42:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrGgw-0006E7-U8 for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:42:59 -0400 Received: from [199.232.76.173] (port=34788 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrGgw-0006Dz-LZ for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:42:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57152) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MrGgw-0004bv-67 for qemu-devel@nongnu.org; Fri, 25 Sep 2009 15:42:54 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n8PJgqMH008600 for ; Fri, 25 Sep 2009 15:42:53 -0400 From: Gerd Hoffmann Date: Fri, 25 Sep 2009 21:42:25 +0200 Message-Id: <1253907769-1067-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 00/24] qdev: bus management updates. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Hi, One more respin, even more improvements. hotplug, meet qdev. qdev, meet hotplug. Changes summary: * allow embedded bus structs. * add bus release function. * added device destruction callback to qdev devices. * make qdev hotplug-aware (NEW!). * make busses use the new features. End result is that you can use qdev_unplug() to unplug a device. Depending on the bus this will either not work at all (ISA), ask the guest OS to release the device (PCI+ACPI) or just zap it (USB). Using the destruction callback everything will be released properly when a device is zapped. qdev will walk the child bus(es) if present and zap all connected devices too. You can pci_del the scsi adapter and all scsi disks will be deleted too. You can pci_del the usb controller and all usb devices connected will be deleted too. You can unplug usb hubs, all connected devices will go away too. cheers, Gerd