qemu-devel@nongnu.org
[Top] [All Lists]

[Qemu-devel] [PATCH 00/24] qdev: bus management updates.

Subject: [Qemu-devel] [PATCH 00/24] qdev: bus management updates.
From: Gerd Hoffmann
Date: Fri, 25 Sep 2009 21:42:25 +0200
  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



<Prev in Thread] Current Thread [Next in Thread>