From: "Michael S. Tsirkin" <mst@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: kwolf@redhat.com, peter.maydell@linaro.org,
peter.crosthwaite@xilinx.com, stefanha@redhat.com,
marcel.a@redhat.com, jan.kiszka@siemens.com,
qemu-devel@nongnu.org, armbru@redhat.com, blauwirbel@gmail.com,
alex.williamson@redhat.com, kraxel@redhat.com,
aliguori@amazon.com, pbonzini@redhat.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCH v6 0/9] Refactor PCI/SHPC/PCIE hotplug to use a more generic hotplug API
Date: Mon, 10 Feb 2014 11:09:16 +0200 [thread overview]
Message-ID: <20140210090916.GA16140@redhat.com> (raw)
In-Reply-To: <1391614612-21107-1-git-send-email-imammedo@redhat.com>
On Wed, Feb 05, 2014 at 04:36:43PM +0100, Igor Mammedov wrote:
> changes since v5:
> - fixed typos Eric pointed to
> - fix conflict of [5/9] with new patch "acpi-build: append description for non-hotplug"
> - rebased on top of todays PCI tree
>
> changes since v4:
> - rebased on top of PCI tree
> - added wrapper to set hotplug-device property
>
> changes since v3:
> - fixup/add comments as reqused by Peter Crosthwaite
> - use error_abort to reduce error handling verbosity
> - fix tests/test-qdev-global-props build failure on make check
> - rebase on top of current master:133fe7743 (with interface fixes)
>
> changes since v2:
> * s/hotplugable/hotpluggable/
> * move hotplug check to an earlier patch:
> "qdev: add "hotpluggable" property to Device"
This was on top my
acpi-build: append description for non-hotplug
which I'm not merging yet, so I had to rebase.
Applied and pushed, please verify and confirm.
> --
> Refactor PCI specific hotplug API to a more generic/reusable one.
> Model it after SCSI-BUS like hotplug API replacing single hotplug
> callback with hotplug/hot_unplug pair of callbacks as suggested by
> Paolo.
> Difference between SCSI-BUS and this approach is that the former
> is BUS centric while the latter is device centred. Which is evolved
> from the fact that hotplug callbacks used by ACPI/SHPC/PCIE are
> implemented by devices rather than by bus and bus serves only as
> a proxy to forward event to hotplug device.
> Memory hotplug also exposes tha same usage pattern hence an attempt
> to generalize hotplug API.
>
> Refactoring also simplifies wiring of a hotplug device with a bus,
> all it needs is to set "hotplug-device" link on bus, which
> would potentially allow to do it from configuration file,
> there is not need to setup hotplug device callbacks on bus
> synce it can get them via HOTPLUG_DEVICE API of "hotplug-device"
> target.
>
> In addition device centred hotplug API may be used by bus-less
> hotplug implementations as well if it's decided to use
> link<foo...> instead of bus.
>
> Patches 8-11 are should be merged as one and are split only for
> simplifying review (they compile fine but PCI hotplug is broken
> until the last patch is applyed).
>
> git tree for testing:
> https://github.com/imammedo/qemu/commits/hotplug_dev_inf_v6
>
> tested only ACPI and PCIE hotplug, since SHPC is not functional, tested
> it under debugger that hotplhug event reaches handler and corresponding interrupt is emited.
>
>
> Igor Mammedov (9):
> define hotplug interface
> qdev: add to BusState "hotplug-handler" link
> qdev: add "hotpluggable" property to Device
> hw/acpi: move typeinfo to the file end
> qdev:pci: refactor PCIDevice to use generic "hotpluggable" property
> acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler API
> pci/shpc: convert SHPC hotplug to use hotplug-handler API
> pci/pcie: convert PCIE hotplug to use hotplug-handler API
> hw/pci: switch to a generic hotplug handling for PCIDevice
>
> hw/acpi/pcihp.c | 46 ++++++++++----
> hw/acpi/piix4.c | 128 +++++++++++++++++++++-------------------
> hw/core/Makefile.objs | 1 +
> hw/core/hotplug.c | 48 +++++++++++++++
> hw/core/qdev.c | 50 ++++++++++++++-
> hw/display/cirrus_vga.c | 2 +-
> hw/display/qxl.c | 2 +-
> hw/display/vga-pci.c | 2 +-
> hw/display/vmware_vga.c | 2 +-
> hw/i386/acpi-build.c | 4 +-
> hw/ide/piix.c | 4 +-
> hw/isa/piix4.c | 2 +-
> hw/pci-bridge/pci_bridge_dev.c | 9 +++
> hw/pci-host/piix.c | 6 +-
> hw/pci/pci.c | 40 +------------
> hw/pci/pcie.c | 65 ++++++++++++--------
> hw/pci/pcie_port.c | 8 +++
> hw/pci/shpc.c | 124 ++++++++++++++++++++++++---------------
> hw/usb/hcd-ehci-pci.c | 2 +-
> hw/usb/hcd-ohci.c | 2 +-
> hw/usb/hcd-uhci.c | 2 +-
> hw/usb/hcd-xhci.c | 2 +-
> include/hw/acpi/acpi.h | 1 +
> include/hw/acpi/pcihp.h | 10 ++-
> include/hw/hotplug.h | 78 ++++++++++++++++++++++++
> include/hw/pci/pci.h | 13 ----
> include/hw/pci/pci_bus.h | 2 -
> include/hw/pci/pcie.h | 5 ++
> include/hw/pci/shpc.h | 8 +++
> include/hw/qdev-core.h | 15 +++++
> tests/Makefile | 2 +-
> 31 files changed, 463 insertions(+), 222 deletions(-)
> create mode 100644 hw/core/hotplug.c
> create mode 100644 include/hw/hotplug.h
next prev parent reply other threads:[~2014-02-10 9:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-05 15:36 [Qemu-devel] [PATCH v6 0/9] Refactor PCI/SHPC/PCIE hotplug to use a more generic hotplug API Igor Mammedov
2014-02-05 15:36 ` [Qemu-devel] [PATCH v6 1/9] define hotplug interface Igor Mammedov
2014-02-05 15:36 ` [Qemu-devel] [PATCH v6 2/9] qdev: add to BusState "hotplug-handler" link Igor Mammedov
2014-02-05 15:52 ` Andreas Färber
2014-02-05 16:31 ` Igor Mammedov
2014-02-05 16:44 ` Paolo Bonzini
2014-02-05 15:36 ` [Qemu-devel] [PATCH v6 3/9] qdev: add "hotpluggable" property to Device Igor Mammedov
2014-02-05 15:36 ` [Qemu-devel] [PATCH v6 4/9] hw/acpi: move typeinfo to the file end Igor Mammedov
2014-02-05 15:36 ` [Qemu-devel] [PATCH v6 5/9] qdev:pci: refactor PCIDevice to use generic "hotpluggable" property Igor Mammedov
2014-02-05 15:36 ` [Qemu-devel] [PATCH v6 6/9] acpi/piix4pm: convert ACPI PCI hotplug to use hotplug-handler API Igor Mammedov
2014-02-05 15:36 ` [Qemu-devel] [PATCH v6 7/9] pci/shpc: convert SHPC " Igor Mammedov
2014-02-05 15:36 ` [Qemu-devel] [PATCH v6 8/9] pci/pcie: convert PCIE " Igor Mammedov
2014-02-05 15:36 ` [Qemu-devel] [PATCH v6 9/9] hw/pci: switch to a generic hotplug handling for PCIDevice Igor Mammedov
2014-02-10 9:09 ` Michael S. Tsirkin [this message]
2014-02-10 9:53 ` [Qemu-devel] [PATCH v6 0/9] Refactor PCI/SHPC/PCIE hotplug to use a more generic hotplug API Igor Mammedov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140210090916.GA16140@redhat.com \
--to=mst@redhat.com \
--cc=afaerber@suse.de \
--cc=alex.williamson@redhat.com \
--cc=aliguori@amazon.com \
--cc=armbru@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=imammedo@redhat.com \
--cc=jan.kiszka@siemens.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcel.a@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@xilinx.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.