qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [for-2.11 PATCH 00/26] spapr: add support for PHB hotplug
@ 2017-07-25 17:57 Greg Kurz
  2017-07-25 17:58 ` [Qemu-devel] [for-2.11 PATCH 01/26] spapr: move spapr_create_phb() to core machine code Greg Kurz
                   ` (27 more replies)
  0 siblings, 28 replies; 100+ messages in thread
From: Greg Kurz @ 2017-07-25 17:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Michael S. Tsirkin, Michael Roth, qemu-ppc, Bharata B Rao,
	Paolo Bonzini, Daniel Henrique Barboza, David Gibson

This series is based on patches from Michel Roth posted in 2015:

https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg04246.html

It addresses comments made during the RFC review, and also provides a bunch
of preliminary cleanup/fix patches. Since we have reached hard-freeze, this
feature is provided by a new pseries-2.11 machine type, introduced by this
series. It is based on David Gibson's ppc-for-2.10 branch, and I believe some
of the preliminary fixes are eligible for 2.10.

Note that it also requires an updated SLOF that supports a new private hcall:
KVMPPC_H_UPDATE_PHANDLE. This is needed because SLOF changes FDT phandles to
Open Firmware phandles. Since the guest only sees the latter, QEMU must use
the updated value when populating the FDT for the hotplugged PHB (otherwise
the guest can't setup IRQs for the PCI devices). SLOF part is already upstream:

http://git.qemu.org/?p=SLOF.git;h=604d28cc3f791657414f8b21103921fa0147fc63

With these patches we support the following:

(qemu) device_add spapr-pci-host-bridge,index=2,id=phb2
(qemu) device_add virtio-net-pci,id=hp2.0,bus=phb2.0
(qemu) device_del hp2.0
(qemu) device_del phb2

I could run some successful tests with a fedora25 guest:
- hotplug PHB + migrate + unplug PHB
- hotplug PHB + hotplug PCI device + unplug PHB => PCI device gets unplugged
- migrate before OS starts + hotplug PHB => destination uses OF phandles
- no regression observed with older machine types

All the patches are also available here:

https://github.com/gkurz/qemu/commits/spapr-hotplug-phb

Cheers,

--
Greg

---

Greg Kurz (14):
      spapr: move spapr_create_phb() to core machine code
      spapr_pci: use memory_region_add_subregion() with DMA windows
      spapr_iommu: use g_strdup_printf() instead of snprintf()
      spapr_drc: use g_strdup_printf() instead of snprintf()
      spapr_iommu: convert TCE table object to realize()
      spapr_pci: parent the MSI memory region to the PHB
      spapr_drc: fix realize and unrealize
      spapr_drc: add unrealize method to physical DRC class
      spapr_iommu: unregister vmstate at unrealize time
      spapr: add pseries-2.11 machine type
      spapr_pci: introduce drc_id property
      spapr: allow guest to update the XICS phandle
      spapr_pci: drop abusive sanity check when migrating the LSI table
      spapr: add hotplug hooks for PHB hotplug

Michael Roth (11):
      spapr_drc: pass object ownership to parent/owner
      spapr_iommu: pass object ownership to parent/owner
      pci: allow cleanup/unregistration of PCI buses
      qdev: store DeviceState's canonical path to use when unparenting
      spapr_pci: add PHB unrealize
      spapr: enable PHB hotplug for pseries-2.11
      spapr: create DR connectors for PHBs
      spapr_events: add support for phb hotplug events
      qdev: pass an Object * to qbus_set_hotplug_handler()
      spapr_pci: provide node start offset via spapr_populate_pci_dt()
      spapr_pci: add ibm, my-drc-index property for PHB hotplug

Nathan Fontenot (1):
      spapr: populate PHB DRC entries for root DT node


 hw/acpi/piix4.c               |    2 
 hw/char/virtio-serial-bus.c   |    2 
 hw/core/bus.c                 |   11 --
 hw/core/qdev.c                |   15 ++-
 hw/pci/pci.c                  |   33 +++++++
 hw/pci/pcie.c                 |    2 
 hw/pci/shpc.c                 |    2 
 hw/ppc/spapr.c                |  205 ++++++++++++++++++++++++++++++++++++++++-
 hw/ppc/spapr_drc.c            |   65 ++++++++++---
 hw/ppc/spapr_events.c         |    3 +
 hw/ppc/spapr_hcall.c          |   20 ++++
 hw/ppc/spapr_iommu.c          |   22 +++-
 hw/ppc/spapr_pci.c            |   86 +++++++++++++----
 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/compat.h           |    3 +
 include/hw/pci-host/spapr.h   |    9 +-
 include/hw/pci/pci.h          |    3 +
 include/hw/ppc/spapr.h        |   15 +++
 include/hw/ppc/spapr_drc.h    |    8 ++
 include/hw/qdev-core.h        |    4 -
 24 files changed, 446 insertions(+), 78 deletions(-)

^ permalink raw reply	[flat|nested] 100+ messages in thread

end of thread, other threads:[~2017-09-17  7:43 UTC | newest]

Thread overview: 100+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 17:57 [Qemu-devel] [for-2.11 PATCH 00/26] spapr: add support for PHB hotplug Greg Kurz
2017-07-25 17:58 ` [Qemu-devel] [for-2.11 PATCH 01/26] spapr: move spapr_create_phb() to core machine code Greg Kurz
2017-07-26  3:32   ` Alexey Kardashevskiy
2017-07-26  3:52     ` David Gibson
2017-07-26  8:55     ` Greg Kurz
2017-07-25 17:58 ` [Qemu-devel] [for-2.11 PATCH 02/26] spapr_pci: use memory_region_add_subregion() with DMA windows Greg Kurz
2017-07-26  3:33   ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2017-07-26  3:53     ` David Gibson
2017-07-26  3:56     ` David Gibson
2017-07-25 17:58 ` [Qemu-devel] [for-2.11 PATCH 03/26] spapr_iommu: use g_strdup_printf() instead of snprintf() Greg Kurz
2017-07-26  3:37   ` Alexey Kardashevskiy
2017-07-26  3:57     ` David Gibson
2017-07-26  9:48     ` Greg Kurz
2017-07-25 17:58 ` [Qemu-devel] [for-2.11 PATCH 04/26] spapr_drc: " Greg Kurz
2017-07-26  3:58   ` David Gibson
2017-07-31 10:11     ` Philippe Mathieu-Daudé
2017-07-31 10:34       ` Greg Kurz
2017-07-31 12:53         ` David Gibson
2017-07-31 14:57           ` Philippe Mathieu-Daudé
2017-07-25 17:59 ` [Qemu-devel] [for-2.11 PATCH 05/26] spapr_iommu: convert TCE table object to realize() Greg Kurz
2017-07-26  4:00   ` David Gibson
2017-07-26  4:15   ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2017-07-25 17:59 ` [Qemu-devel] [for-2.11 PATCH 06/26] spapr_pci: parent the MSI memory region to the PHB Greg Kurz
2017-07-26  4:01   ` David Gibson
2017-07-26  4:29   ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2017-07-26 13:56     ` Greg Kurz
2017-07-25 17:59 ` [Qemu-devel] [for-2.11 PATCH 07/26] spapr_drc: fix realize and unrealize Greg Kurz
2017-07-26  4:04   ` David Gibson
2017-07-26  9:36     ` Greg Kurz
2017-07-27  3:44       ` David Gibson
2017-07-25 17:59 ` [Qemu-devel] [for-2.11 PATCH 08/26] spapr_drc: add unrealize method to physical DRC class Greg Kurz
2017-07-26  4:06   ` David Gibson
2017-07-26 14:22     ` Greg Kurz
2017-07-25 17:59 ` [Qemu-devel] [for-2.11 PATCH 09/26] spapr_drc: pass object ownership to parent/owner Greg Kurz
2017-07-26  4:07   ` David Gibson
2017-07-25 18:00 ` [Qemu-devel] [for-2.11 PATCH 10/26] spapr_iommu: " Greg Kurz
2017-07-26  4:08   ` David Gibson
2017-07-25 18:00 ` [Qemu-devel] [for-2.11 PATCH 11/26] spapr_iommu: unregister vmstate at unrealize time Greg Kurz
2017-07-26  4:15   ` David Gibson
2017-07-25 18:00 ` [Qemu-devel] [for-2.11 PATCH 12/26] pci: allow cleanup/unregistration of PCI buses Greg Kurz
2017-07-25 18:00 ` [Qemu-devel] [for-2.11 PATCH 13/26] qdev: store DeviceState's canonical path to use when unparenting Greg Kurz
2017-07-26  5:24   ` David Gibson
2017-07-26 12:03     ` Michael Roth
2017-07-27 16:50     ` Greg Kurz
2017-07-28  2:59       ` David Gibson
2017-07-25 18:01 ` [Qemu-devel] [for-2.11 PATCH 14/26] spapr_pci: add PHB unrealize Greg Kurz
2017-07-25 18:01 ` [Qemu-devel] [for-2.11 PATCH 15/26] spapr: add pseries-2.11 machine type Greg Kurz
2017-07-26  5:28   ` David Gibson
2017-07-25 18:01 ` [Qemu-devel] [for-2.11 PATCH 16/26] spapr: enable PHB hotplug for pseries-2.11 Greg Kurz
2017-07-26  4:42   ` [Qemu-devel] [Qemu-ppc] " Alexey Kardashevskiy
2017-07-26 14:32     ` Greg Kurz
2017-07-27 15:52       ` Michael Roth
2017-07-25 18:01 ` [Qemu-devel] [for-2.11 PATCH 17/26] spapr_pci: introduce drc_id property Greg Kurz
2017-07-28  3:46   ` David Gibson
2017-07-25 18:01 ` [Qemu-devel] [for-2.11 PATCH 18/26] spapr: create DR connectors for PHBs Greg Kurz
2017-07-28  3:49   ` David Gibson
2017-07-28 10:30     ` Greg Kurz
2017-07-31  2:58       ` David Gibson
2017-09-06 11:32         ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2017-09-13 12:23           ` David Gibson
2017-09-13 12:56             ` Greg Kurz
2017-09-15  9:09               ` David Gibson
2017-07-25 18:02 ` [Qemu-devel] [for-2.11 PATCH 19/26] spapr: populate PHB DRC entries for root DT node Greg Kurz
2017-07-25 20:51   ` Michael Roth
2017-07-26 15:45     ` Greg Kurz
2017-07-26  5:47   ` David Gibson
2017-07-26 15:01     ` Greg Kurz
2017-07-25 18:02 ` [Qemu-devel] [for-2.11 PATCH 20/26] spapr_events: add support for phb hotplug events Greg Kurz
2017-07-25 18:02 ` [Qemu-devel] [for-2.11 PATCH 21/26] qdev: pass an Object * to qbus_set_hotplug_handler() Greg Kurz
2017-07-28  3:50   ` David Gibson
2017-07-25 18:02 ` [Qemu-devel] [for-2.11 PATCH 22/26] spapr_pci: provide node start offset via spapr_populate_pci_dt() Greg Kurz
2017-07-28  3:52   ` David Gibson
2017-07-25 18:02 ` [Qemu-devel] [for-2.11 PATCH 23/26] spapr_pci: add ibm, my-drc-index property for PHB hotplug Greg Kurz
2017-07-25 18:03 ` [Qemu-devel] [for-2.11 PATCH 24/26] spapr: allow guest to update the XICS phandle Greg Kurz
2017-07-26  5:38   ` Alexey Kardashevskiy
2017-07-28  4:02   ` David Gibson
2017-07-28  6:20     ` Thomas Huth
2017-07-31  4:58       ` David Gibson
2017-08-01  2:20         ` Alexey Kardashevskiy
2017-08-01 11:26           ` Greg Kurz
2017-08-02  2:35             ` David Gibson
2017-07-25 18:03 ` [Qemu-devel] [for-2.11 PATCH 25/26] spapr_pci: drop abusive sanity check when migrating the LSI table Greg Kurz
2017-07-28  4:09   ` David Gibson
2017-07-26  3:44 ` [Qemu-devel] [for-2.11 PATCH 00/26] spapr: add support for PHB hotplug Alexey Kardashevskiy
2017-07-26  8:48   ` Greg Kurz
2017-07-26  8:40 ` [Qemu-devel] [for-2.11 PATCH 26/26] spapr: add hotplug hooks " Greg Kurz
2017-07-27  4:41   ` Alexey Kardashevskiy
2017-07-27 17:09     ` Greg Kurz
2017-07-27 18:37       ` Michael Roth
2017-08-01 14:59         ` Greg Kurz
2017-07-28  4:24       ` David Gibson
2017-08-01 15:30         ` Greg Kurz
2017-08-02  2:39           ` David Gibson
2017-08-02  7:43             ` Greg Kurz
2017-07-26 20:31 ` [Qemu-devel] [Qemu-ppc] [for-2.11 PATCH 00/26] spapr: add support " Daniel Henrique Barboza
2017-07-27 16:39   ` Greg Kurz
2017-07-28  3:27     ` Alexey Kardashevskiy
2017-07-28  3:40       ` David Gibson
2017-07-28  5:35         ` Cédric Le Goater
2017-07-28  8:39           ` Greg Kurz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).