[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/13] spapr: Direct all PCI hotplug to host bridge,
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 09/13] spapr: Direct all PCI hotplug to host bridge, rather than P2P bridge |
Date: |
Wed, 12 Jun 2019 15:49:25 +1000 |
A P2P bridge will attempt to handle the hotplug with SHPC, which doesn't
work in the PAPR environment. Instead we want to direct all PCI hotplug
actions to the PAPR specific host bridge which will use the PAPR hotplug
mechanism.
Signed-off-by: David Gibson <address@hidden>
Acked-by: Michael S. Tsirkin <address@hidden>
---
hw/ppc/spapr.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 507fd50dd5..6dd8aaac33 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -4094,6 +4094,17 @@ static HotplugHandler
*spapr_get_hotplug_handler(MachineState *machine,
object_dynamic_cast(OBJECT(dev), TYPE_SPAPR_PCI_HOST_BRIDGE)) {
return HOTPLUG_HANDLER(machine);
}
+ if (object_dynamic_cast(OBJECT(dev), TYPE_PCI_DEVICE)) {
+ PCIDevice *pcidev = PCI_DEVICE(dev);
+ PCIBus *root = pci_device_root_bus(pcidev);
+ SpaprPhbState *phb =
+ (SpaprPhbState *)object_dynamic_cast(OBJECT(BUS(root)->parent),
+ TYPE_SPAPR_PCI_HOST_BRIDGE);
+
+ if (phb) {
+ return HOTPLUG_HANDLER(phb);
+ }
+ }
return NULL;
}
--
2.21.0
- [Qemu-devel] [PULL 00/13] ppc-for-4.1 queue 20190612, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 03/13] spapr: Clean up device node name generation for PCI devices, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 02/13] target/ppc: Fix lxvw4x, lxvh8x and lxvb16x, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 01/13] spapr_pci: Improve error message, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 09/13] spapr: Direct all PCI hotplug to host bridge, rather than P2P bridge,
David Gibson <=
- [Qemu-devel] [PULL 04/13] spapr: Clean up device tree construction for PCI devices, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 12/13] ppc/pnv: activate the "dumpdtb" option on the powernv machine, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 08/13] spapr: Don't use bus number for building DRC ids, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 13/13] ppc/xive: Make XIVE generate the proper interrupt types, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 10/13] spapr: Allow hot plug/unplug of PCI bridges and devices under PCI bridges, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 07/13] spapr: Clean up DRC index construction, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 06/13] spapr: Clean up spapr_drc_populate_dt(), David Gibson, 2019/06/12
- [Qemu-devel] [PULL 05/13] spapr: Clean up dt creation for PCI buses, David Gibson, 2019/06/12
- [Qemu-devel] [PULL 11/13] target/ppc: Use tcg_gen_gvec_bitsel, David Gibson, 2019/06/12
- Re: [Qemu-devel] [PULL 00/13] ppc-for-4.1 queue 20190612, Peter Maydell, 2019/06/12