Skip to content

qdev: bus management updates.

Gerd Hoffmann qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13allow qdev busses allocations be inplacehw/qdev.c hw/qdev.h+15 -30 replies
2/13switch scsi bus to inplace allocation.hw/esp.c hw/lsi53c895a.c hw/scsi-bus.c +2 more+19 -220 replies
3/13switch usb bus to inplace allocation.hw/usb-bus.c hw/usb-musb.c hw/usb-ohci.c +2 more+12 -150 replies
4/13switch ide bus to inplace allocation.hw/ide/internal.h hw/ide/isa.c hw/ide/pci.c +1 more+36 -390 replies
5/13inplace allocation for pci, split irq init.hw/pci.c hw/pci.h+38 -100 replies
6/13convert pci bridge to qdevhw/pci.c+48 -184 replies
7/13piix_pci: kill PIIX3IrqStatehw/piix_pci.c+17 -202 replies
8/13qdev: device free fixups.hw/qdev.c hw/qdev.h+38 -41 reply
9/13Add exit callback to DeviceInfo.hw/qdev.c hw/qdev.h+4 -04 replies
10/13Implement scsi device destructionhw/scsi-bus.c hw/scsi-disk.c hw/scsi-generic.c+21 -116 replies
11/13pci: use qdev for device destruction.hw/pci-hotplug.c hw/pci.c hw/pci.h+4 -50 replies
12/13pci: move unregister from PCIDevice to PCIDeviceInfohw/e1000.c hw/eepro100.c hw/lsi53c895a.c +5 more+13 -114 replies
13/13usb: hook unplug into qdev, cleanups + fixes.hw/usb-bt.c hw/usb-bus.c hw/usb-hid.c +5 more+56 -150 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH 00/13] qdev: bus management updates.

Hi,

This patch series does a bunch of improvements for qdev busses. The former name was "allow embedded bus structs", but that title doesn't cut it any more as there are lots of followup improvements and fixes. Changes:

* allow embedded bus structs (yes, still there).
* add bus release function.
* added device destruction callback to qdev devices.
* make busses use the new features.

End result is that you can use qdev_free() to zap a device. Using the destruction callback everything will be released properly. 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