Skip to content

qdev: Hotplug handler chaining

David Hildenbrand qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 3 repliesIn review
  2. v13 patches 1 replySuperseded

Changes in v2 from the cover letter

- Fixed spapr PHB unplug which was just upstreamed

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3qdev: Let the hotplug_handler_unplug() caller delete the devicehw/acpi/cpu.c hw/acpi/memory_hotplug.c hw/acpi/pcihp.c +10 more+37 -211 reply
2/3qdev: Let machine hotplug handler to override bus hotplug handlerhw/core/qdev.c include/hw/qdev-core.h+13 -40 replies
3/3qdev: Provide qdev_get_bus_hotplug_handler()hw/core/qdev.c include/hw/qdev-core.h+10 -10 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchIgor MammedovCornelia HuckDavid GibsonGreg Kurz
1/3R-b A-b R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/3] qdev: Hotplug handler chaining

Can somebody please pick this up in the near future? (@Eduardo, @MST, @Paolo, @David - I have no idea who the right person is :) )

The longer we wait, the more likely it is that some stuff gets upstreamed that conflicts with patch 1 and will break unnoticed. (e.g. spapr PHB hotplug was just upstreamed and required a fixup, luckily I was CC'ed on that one).

---

This series implements support for hotplug handler chaining (proposed by Igor), something that is necessary to turn selected virtio devices into memory devices. Planned devices inlude virtio-mem and virtio-pmem.

The machine hotplug handler can intercept hotplug handler calls to properly prepare/teardown the memory device part of a device. Control is then passed on to the actual bus hotplug handler. So the default hotplug handler is effectively overwritten to make interception possible.

This series was tested against the - now upstream - device unplug tests part of "tests/device-plug-test".

v1 -> v2:
- Fixed spapr PHB unplug which was just upstreamed

RFCv2 -> v1:
- "qdev: Let the hotplug_handler_unplug() caller delete the device" -- Fixed two spapr delete_device() calls I missed. Covered by tests now -- Handle + add a comment for host pci bridge unplug, for which we have code but no user yet.
- virtio-pmem prototype will be handled from this point by Pankaj again, so no longer included

David Hildenbrand (2):
qdev: Let the hotplug_handler_unplug() caller delete the device
qdev: Provide qdev_get_bus_hotplug_handler()

Igor Mammedov (1):
qdev: Let machine hotplug handler to override bus hotplug handler

 hw/acpi/cpu.c            |  1 +
 hw/acpi/memory_hotplug.c |  1 +
 hw/acpi/pcihp.c          |  3 ++-
 hw/core/qdev.c           | 19 ++++++++++++-------
 hw/i386/pc.c             |  5 ++---
 hw/pci/pci.c             |  3 ++-
 hw/pci/pcie.c            |  3 ++-
 hw/pci/shpc.c            |  3 ++-
 hw/ppc/spapr.c           |  9 ++++++---
 hw/ppc/spapr_pci.c       |  3 ++-
 hw/s390x/css-bridge.c    |  2 +-
 hw/s390x/s390-pci-bus.c  | 13 ++++++++-----
 include/hw/qdev-core.h   | 12 ++++++++++++
 qdev-monitor.c           |  9 +++++++--
 14 files changed, 60 insertions(+), 26 deletions(-)
Signature · 1 line
2.17.2