[Qemu-devel] [PATCH v2 0/8] pseries: Allow hotplug of P2P bridges and devices under P2P bridges

David Gibson posted 8 patches 4 years, 11 months ago
Test s390x passed
Test checkpatch passed
Test asan passed
Test docker-mingw@fedora passed
Test docker-clang@ubuntu passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190530053831.22115-1-david@gibson.dropbear.id.au
Maintainers: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/spapr.c              |  25 +-
hw/ppc/spapr_drc.c          |  13 +-
hw/ppc/spapr_pci.c          | 486 ++++++++++++++++++++++--------------
include/hw/pci-host/spapr.h |   4 +-
include/hw/ppc/spapr_drc.h  |   3 +-
5 files changed, 327 insertions(+), 204 deletions(-)
[Qemu-devel] [PATCH v2 0/8] pseries: Allow hotplug of P2P bridges and devices under P2P bridges
Posted by David Gibson 4 years, 11 months ago
PAPR has its own PCI hotplug mechanism which we implemented quite a
while ago.  However, we weren't able to hotplug devices under PCI
bridges, because the pci-bridge code would try to handle the hotplug
using SHPC which won't work with PAPR.

We now have the infrastructure in the hotplug core to have the machine
take control of the hotplug before the bus tries to claim it, which
lets us address this.  While we're about it, make a bunch of cleanups
and also allow hot plug of P2P bridges themselves (this turns out to
be quite straightforward once the rest is in place).

For now, we don't support hot unplug of bridges - this seems to cause
problems, at least for a Linux guest.  I suspect the problem is on the
guest side, but for now just prohibit until we have time to
investigate properly.

Changes since v1:
 * Added proper cover letter
 * Addressed some minor comments

David Gibson (8):
  spapr: Clean up device node name generation for PCI devices
  spapr: Clean up device tree construction for PCI devices
  spapr: Clean up dt creation for PCI buses
  spapr: Clean up spapr_drc_populate_dt()
  spapr: Clean up DRC index construction
  spapr: Don't use bus number for building DRC ids
  spapr: Direct all PCI hotplug to host bridge, rather than P2P bridge
  spapr: Allow hot plug/unplug of PCI bridges and devices under PCI
    bridges

 hw/ppc/spapr.c              |  25 +-
 hw/ppc/spapr_drc.c          |  13 +-
 hw/ppc/spapr_pci.c          | 486 ++++++++++++++++++++++--------------
 include/hw/pci-host/spapr.h |   4 +-
 include/hw/ppc/spapr_drc.h  |   3 +-
 5 files changed, 327 insertions(+), 204 deletions(-)

-- 
2.21.0


Re: [Qemu-devel] [PATCH v2 0/8] pseries: Allow hotplug of P2P bridges and devices under P2P bridges
Posted by David Gibson 4 years, 10 months ago
On Thu, May 30, 2019 at 03:38:23PM +1000, David Gibson wrote:
> PAPR has its own PCI hotplug mechanism which we implemented quite a
> while ago.  However, we weren't able to hotplug devices under PCI
> bridges, because the pci-bridge code would try to handle the hotplug
> using SHPC which won't work with PAPR.
> 
> We now have the infrastructure in the hotplug core to have the machine
> take control of the hotplug before the bus tries to claim it, which
> lets us address this.  While we're about it, make a bunch of cleanups
> and also allow hot plug of P2P bridges themselves (this turns out to
> be quite straightforward once the rest is in place).
> 
> For now, we don't support hot unplug of bridges - this seems to cause
> problems, at least for a Linux guest.  I suspect the problem is on the
> guest side, but for now just prohibit until we have time to
> investigate properly.

I've fixed the problem Alexey pointed out, and I've merged this
tentatively to the ppc-for-4.1 branch.

> 
> Changes since v1:
>  * Added proper cover letter
>  * Addressed some minor comments
> 
> David Gibson (8):
>   spapr: Clean up device node name generation for PCI devices
>   spapr: Clean up device tree construction for PCI devices
>   spapr: Clean up dt creation for PCI buses
>   spapr: Clean up spapr_drc_populate_dt()
>   spapr: Clean up DRC index construction
>   spapr: Don't use bus number for building DRC ids
>   spapr: Direct all PCI hotplug to host bridge, rather than P2P bridge
>   spapr: Allow hot plug/unplug of PCI bridges and devices under PCI
>     bridges
> 
>  hw/ppc/spapr.c              |  25 +-
>  hw/ppc/spapr_drc.c          |  13 +-
>  hw/ppc/spapr_pci.c          | 486 ++++++++++++++++++++++--------------
>  include/hw/pci-host/spapr.h |   4 +-
>  include/hw/ppc/spapr_drc.h  |   3 +-
>  5 files changed, 327 insertions(+), 204 deletions(-)
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson