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 Latest24 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24unbreak usb pass-through on linux.usb-linux.c+2 -00 replies
2/24allow qdev busses allocations be inplacehw/qdev.c hw/qdev.h+15 -30 replies
3/24switch scsi bus to inplace allocation.hw/esp.c hw/lsi53c895a.c hw/scsi-bus.c +2 more+19 -220 replies
4/24switch usb bus to inplace allocation.hw/usb-bus.c hw/usb-musb.c hw/usb-ohci.c +2 more+12 -150 replies
5/24switch ide bus to inplace allocation.hw/ide/internal.h hw/ide/isa.c hw/ide/pci.c +1 more+36 -390 replies
6/24inplace allocation for pci, split irq init.hw/pci.c hw/pci.h+38 -100 replies
7/24convert pci bridge to qdevhw/pci.c+48 -180 replies
8/24piix_pci: kill PIIX3IrqStatehw/piix_pci.c+17 -200 replies
9/24qdev: device free fixups.hw/qdev.c hw/qdev.h+38 -40 replies
10/24Add exit callback to DeviceInfo.hw/qdev.c hw/qdev.h+4 -00 replies
11/24Implement scsi device destructionhw/scsi-bus.c hw/scsi-disk.c hw/scsi-generic.c+21 -110 replies
12/24pci: use qdev for device destruction.hw/pci-hotplug.c hw/pci.c hw/pci.h+4 -50 replies
13/24pci: move unregister from PCIDevice to PCIDeviceInfohw/e1000.c hw/eepro100.c hw/lsi53c895a.c +5 more+13 -110 replies
14/24usb: hook unplug into qdev, cleanups + fixes.hw/usb-bt.c hw/usb-bus.c hw/usb-hid.c +5 more+56 -150 replies
15/24switch qemu-config to qemu_errorqemu-config.c+5 -42 replies
16/24qdev hotplug: infrastructure and monitor commands.hw/qdev.c hw/qdev.h qemu-monitor.hx +1 more+107 -24 replies
17/24usb: hotplug winduphw/usb-bus.c+2 -00 replies
18/24scsi: hotplug winduphw/scsi-bus.c hw/usb-msd.c+3 -00 replies
19/24pci: hotplug winduphw/pci.c hw/pci.h+25 -20 replies
20/24pci: windup acpi-based hotplughw/acpi.c hw/pc.c hw/pc.h +2 more+26 -420 replies
21/24drive cleanup fixes.hw/device-hotplug.c hw/pci-hotplug.c hw/scsi-disk.c +6 more+25 -430 replies
22/24refactor drive_hot_addhw/pci-hotplug.c+19 -190 replies
23/24allow if=none for drive_addhw/pci-hotplug.c+3 -00 replies
24/24store a pointer to QemuOpts in DeviceState, release it when zapping a device.hw/qdev.c hw/qdev.h+4 -00 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/24] qdev: bus management updates.

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