qemu-e2k/hw/ppc
Greg Kurz 4560116e42 spapr_pci: Fix broken naming of PCI bus
Recent commit 5cf0d326a0 fixed a regression which was preventing the
guest to access the extended config space of a PCIe device. This was
done by introducing a new PCI bus subtype for PAPR. The original fix
was causing PCI busses to be named "spapr-pci-host-bridge-root-bus.N"
instead of "pci.N", which was making upper layers unhappy of course.
This got worked around by hardcoding the PCI bus name to "pci.0", but
this only works for the default PHB. And we're now hitting:

# qemu-system-ppc64 \
             -device spapr-pci-host-bridge,index=1 \
             -device e1000e,bus=pci.0 \
             -device e1000e,bus=pci.1
qemu-system-ppc64: -device e1000e,bus=pci.1: Bus 'pci.1' not found

David already posted some patches [1] to control PCI extended config
space accesses with a new flag in the base PCI bus class instead of
subtyping. These patches are a bit more intrusive though, and
are targetted for 4.1.

When no name is passed to pci_register_bus(), the core device code
generates a lowercase name based on the QOM typename. The typename
for the base PCI bus class is "PCI", hence the "pci.0", "pci.1"
bus names. Rename the type of the PAPR PCI bus to "pci", so that
the QOM code can generate proper names. This is a hack but it is
enough to fix the regression. And all this will be reworked properly
in 4.1.

[1] https://patchwork.ozlabs.org/project/qemu-devel/list/?series=100486

Fixes: 5cf0d326a0
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <155500034416.646888.1307366522340665522.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-04-12 12:23:02 +10:00
..
e500-ccsr.h ppc: do not use ../ in include files 2013-03-01 13:57:33 +01:00
e500.c PPC: E500: Add FSL I2C controller and integrate RTC with it 2019-03-12 14:33:04 +11:00
e500.h platform-bus-device: use device plug callback instead of machine_done notifier 2018-05-10 18:10:56 +01:00
e500plat.c hw/ppc: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
fdt.c target/ppc: Split page size information into a separate allocation 2018-04-27 18:05:22 +10:00
Kconfig virtio-vga: only enable for specific boards 2019-03-21 17:42:18 +01:00
mac_newworld.c mac_newworld: use node name instead of alias name for hd device in FWPathProvider 2019-03-12 14:33:04 +11:00
mac_oldworld.c mac_oldworld: use node name instead of alias name for hd device in FWPathProvider 2019-03-12 14:33:04 +11:00
mac.h macio: move MACIOIDEState type declarations to macio.h 2018-08-30 10:42:18 +10:00
Makefile.objs hw/ppc/Makefile.objs: Build all boards conditinally with CONFIG_* 2019-02-05 16:50:20 +01:00
mpc8544_guts.c shutdown: Add source information to SHUTDOWN and RESET 2017-05-23 13:28:17 +02:00
mpc8544ds.c ppc: e500: switch E500 based machines to full machine definition 2018-04-27 18:05:23 +10:00
pnv_bmc.c Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
pnv_core.c ppc/pnv: POWER9 XSCOM quad support 2019-03-12 14:33:04 +11:00
pnv_lpc.c ppc/pnv: add SerIRQ routing registers 2019-03-12 14:33:04 +11:00
pnv_occ.c ppc/pnv: add a OCC model for POWER9 2019-03-12 14:33:04 +11:00
pnv_psi.c ppc/pnv: Fix variable size in pnv_psi_power9_irq_set() 2019-03-19 15:20:14 +11:00
pnv_xscom.c ppc/pnv: add more dummy XSCOM addresses 2019-03-12 14:33:05 +11:00
pnv.c ppc/pnv: Use local_err variable in pnv_chip_power9_intc_create() 2019-03-19 15:20:14 +11:00
ppc4xx_devs.c ppc4xx: Pass array index to function instead of pointer into the array 2019-02-04 18:44:17 +11:00
ppc4xx_pci.c ppc4xx_pci: convert SysBus init method to a realize method 2018-11-08 12:04:40 +11:00
ppc405_boards.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
ppc405_uc.c hw/ppc: Move ppc40x_*reset() functions from ppc405_uc.c to ppc.c 2019-02-04 18:44:18 +11:00
ppc405.h ppc4xx: Export ECB and PLB emulation 2017-09-08 09:30:55 +10:00
ppc440_bamboo.c elf: Add optional function ptr to load_elf() to parse ELF notes 2019-02-05 16:50:16 +01:00
ppc440_pcix.c ppc440_pcix: convert SysBus init method to a realize method 2018-11-08 12:04:40 +11:00
ppc440_uc.c ppc440: Avoid reporting error when reading non-existent RAM slot 2019-02-04 18:44:17 +11:00
ppc440.h ppc440_uc: Basic emulation of PPC440 DMA controller 2018-07-03 09:56:52 +10:00
ppc_booke.c hw/ppc: Don't include m48t59.h if it is not necessary 2019-02-04 18:44:20 +11:00
ppc.c target/ppc: Consolidate 64-bit server processor detection in a helper 2019-03-29 10:22:22 +11:00
ppce500_spin.c hw/ppc: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
prep_systemio.c prep: add PReP System I/O 2017-01-31 10:10:13 +11:00
prep.c hw/ppc/prep: Drop useless inclusion of "hw/i386/pc.h" 2019-02-17 21:54:02 +11:00
rs6000_mc.c hw/ppc: Use the IEC binary prefix definitions 2018-07-02 15:41:16 +02:00
sam460ex.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00
spapr_caps.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_cpu_core.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_drc.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_events.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_hcall.c spapr: Correctly set LPCR[GTSE] in H_REGISTER_PROCESS_TABLE 2019-03-19 15:20:14 +11:00
spapr_iommu.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_irq.c spapr/irq: Add XIVE sanity checks on non-P9 machines 2019-03-29 10:38:20 +11:00
spapr_ovec.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_pci_vfio.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_pci.c spapr_pci: Fix broken naming of PCI bus 2019-04-12 12:23:02 +10:00
spapr_rng.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_rtas_ddw.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_rtas.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_rtc.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr_vio.c spapr: Use CamelCase properly 2019-03-12 14:33:05 +11:00
spapr.c spapr/irq: Add XIVE sanity checks on non-P9 machines 2019-03-29 10:38:20 +11:00
trace-events trace-events: Fix attribution of trace points to source 2019-03-22 16:18:07 +00:00
virtex_ml507.c pflash: Clean up after commit 368a354f02, part 2 2019-03-11 22:53:44 +01:00