ppc-for-4.0 queue 20190412
The following changes since commit 532cc6da74ec25b5ba6893b5757c977d54582949:
Update version for v4.0.0-rc3 release (2019-04-10 15:38:59 +0100)
are available in the Git repository at:
git://github.com/dgibson/qemu.git tags/ppc-for-4.0-20190412
for you to fetch changes up to 4560116e42a21989a4b6cf9551ce2f90b16c7238:
spapr_pci: Fix broken naming of PCI bus (2019-04-12 12:23:02 +1000)
----------------------------------------------------------------
ppc patch queue for 2018-04-12
Here's a last minute pull request for 4.0. Turns out my last pull request, to fix a regression in extended config space access for the pseries machine didn't fix things hard enough. This PR has a single patch which improves the fix to work in more cases.
It's a ghastly, ghastly hack, but it's simple and localized. I already have patches almost ready to go in 4.1 that provides a simpler and cleaner solution to all this.
----------------------------------------------------------------
Greg Kurz (1):
spapr_pci: Fix broken naming of PCI bus
hw/ppc/spapr_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
[Qemu-devel] [PULL 1/1] spapr_pci: Fix broken naming of PCI bus
From: Greg Kurz <[email protected]>
Recent commit 5cf0d326a0fe 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 foundDavid 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
Message-Id: <155500034416.646888.1307366522340665522.stgit@bahia.lab.toulouse-stg.fr.ibm.com>
--- hw/ppc/spapr_pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/ppc/spapr_pci.c +2 -2
@@ -1652,7 +1652,7 @@ static void spapr_phb_root_bus_class_init(ObjectClass *klass, void *data) pbc->allows_extended_config_space = spapr_phb_allows_extended_config_space; } -#define TYPE_SPAPR_PHB_ROOT_BUS "spapr-pci-host-bridge-root-bus" +#define TYPE_SPAPR_PHB_ROOT_BUS "pci"static const TypeInfo spapr_phb_root_bus_info = { .name =TYPE_SPAPR_PHB_ROOT_BUS ,
@@ -1761,7 +1761,7 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp)memory_region_add_subregion (get_system_memory (), sphb->io_win_addr, &sphb->iowindow); - bus = pci_register_root_bus(dev, "pci.0", + bus = pci_register_root_bus(dev, NULL, pci_spapr_set_irq, pci_spapr_map_irq, sphb, &sphb->memspace, &sphb->iospace, PCI_DEVFN(0, 0), PCI_NUM_PINS,
Signature · 1 line
2.20.1
Peter Maydell
AppliedQuoted 21 lines · David Gibson
The following changes since commit
532cc6da74ec25b5ba6893b5757c977d54582949:Update version for v4.0.0-rc3 release (2019-04-10 15:38:59 +0100)
are available in the Git repository at:
git://github.com/dgibson/qemu.gittags/ppc-for-4.0-20190412for you to fetch changes up to
4560116e42a21989a4b6cf9551ce2f90b16c7238:
spapr_pci: Fix broken naming of PCI bus (2019-04-12 12:23:02 +1000)----------------------------------------------------------------
ppc patch queue for 2018-04-12Here's a last minute pull request for 4.0. Turns out my last pull request, to fix a regression in extended config space access for the pseries machine didn't fix things hard enough. This PR has a single patch which improves the fix to work in more cases.
Quoted 5 lines
It's a ghastly, ghastly hack, but it's simple and localized. I already have patches almost ready to go in 4.1 that provides a simpler and cleaner solution to all this.
----------------------------------------------------------------
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/4.0
for any user-visible changes.
-- PMM