[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v2 07/13] qdev: pass an Object * to qbus_set_hotpl
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-ppc] [PATCH v2 07/13] qdev: pass an Object * to qbus_set_hotplug_handler() |
Date: |
Mon, 14 Jan 2019 13:23:09 +0100 |
On Fri, 11 Jan 2019 22:02:50 +0100
Greg Kurz <address@hidden> wrote:
> From: Michael Roth <address@hidden>
>
> Certain devices types, like memory/CPU, are now being handled using a
> hotplug interface provided by a top-level MachineClass. Hotpluggable
> host bridges are another such device where it makes sense to use a
> machine-level hotplug handler. However, unlike those devices,
> host-bridges have a parent bus (the main system bus), and devices with
> a parent bus use a different mechanism for registering their hotplug
> handlers: qbus_set_hotplug_handler(). This interface currently expects
> a handler to be a subclass of DeviceClass, but this is not the case
> for MachineClass, which derives directly from ObjectClass.
>
> Internally, the interface only requires an ObjectClass, so expose that
> in qbus_set_hotplug_handler().
>
> Cc: Michael S. Tsirkin <address@hidden>
> Cc: Eduardo Habkost <address@hidden>
> Signed-off-by: Michael Roth <address@hidden>
> Signed-off-by: Greg Kurz <address@hidden>
> Reviewed-by: David Gibson <address@hidden>
> ---
> hw/acpi/pcihp.c | 2 +-
> hw/acpi/piix4.c | 2 +-
> hw/char/virtio-serial-bus.c | 2 +-
> hw/core/bus.c | 11 ++---------
> hw/pci/pcie.c | 2 +-
> hw/pci/shpc.c | 2 +-
> hw/ppc/spapr_pci.c | 2 +-
> hw/s390x/css-bridge.c | 2 +-
> hw/s390x/s390-pci-bus.c | 6 +++---
> hw/scsi/virtio-scsi.c | 2 +-
> hw/scsi/vmw_pvscsi.c | 2 +-
> hw/usb/dev-smartcard-reader.c | 2 +-
> include/hw/qdev-core.h | 3 +--
> 13 files changed, 16 insertions(+), 24 deletions(-)
Reviewed-by: Cornelia Huck <address@hidden>
- [Qemu-ppc] [PATCH v2 00/13] spapr: Add support for PHB hotplug, Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 01/13] ppc: Move spapr-related prototypes from xics.h into a seperate header file, Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 02/13] spapr: Rename xics to intc in interrupt controller agnostic code, Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 03/13] spapr_pci: add PHB unrealize, Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 04/13] spapr: create DR connectors for PHBs, Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 05/13] spapr: populate PHB DRC entries for root DT node, Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 06/13] spapr_events: add support for phb hotplug events, Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 07/13] qdev: pass an Object * to qbus_set_hotplug_handler(), Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 08/13] spapr_pci: provide node start offset via spapr_populate_pci_dt(), Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 09/13] spapr_pci: add ibm, my-drc-index property for PHB hotplug, Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 10/13] spapr_irq: Expose the phandle of the interrupt controller, Greg Kurz, 2019/01/11
- [Qemu-ppc] [PATCH v2 11/13] spapr_irq: Allow synchronization of a single irq state to KVM, Greg Kurz, 2019/01/11