[Qemu-devel] [PATCH v1 0/3] qdev: Hotplug handler chaining

David Hildenbrand posted 3 patches 5 years, 1 month ago
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu failed
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190218101254.8007-1-david@redhat.com
Maintainers: Halil Pasic <pasic@linux.ibm.com>, "Michael S. Tsirkin" <mst@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, David Gibson <david@gibson.dropbear.id.au>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Collin Walling <walling@linux.ibm.com>, Igor Mammedov <imammedo@redhat.com>, David Hildenbrand <david@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Richard Henderson <rth@twiddle.net>
There is a newer version of this series
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           |  6 ++++--
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, 58 insertions(+), 25 deletions(-)
[Qemu-devel] [PATCH v1 0/3] qdev: Hotplug handler chaining
Posted by David Hildenbrand 5 years, 1 month ago
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
  [PATCH v3 0/6] tests: Add device unplug tests

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           |  6 ++++--
 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, 58 insertions(+), 25 deletions(-)

-- 
2.17.2


Re: [Qemu-devel] [PATCH v1 0/3] qdev: Hotplug handler chaining
Posted by David Hildenbrand 5 years ago
On 18.02.19 11:12, David Hildenbrand wrote:
> 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
>   [PATCH v3 0/6] tests: Add device unplug tests
> 
> 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

Are there any more comments? I will resend as soon as the latest spapr
PULL request gets merged, because one patch conflicts with patch #1.

> 
> 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           |  6 ++++--
>  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, 58 insertions(+), 25 deletions(-)
> 


-- 

Thanks,

David / dhildenb