qemu/hw/ppc
David Gibson 568f0690fd pci: Replace pci_find_domain() with more general pci_root_bus_path()
pci_find_domain() is used in a number of places where we want an id for a
whole PCI domain (i.e. the subtree under a PCI root bus).  The trouble is
that many platforms may support multiple independent host bridges with no
hardware supplied notion of domain number.

This patch, therefore, replaces calls to pci_find_domain() with calls to
a new pci_root_bus_path() returning a string.  The new call is implemented
in terms of a new callback in the host bridge class, so it can be defined
in some way that's well defined for the platform.  When no callback is
available we fall back on the qbus name.

Most current uses of pci_find_domain() are for error or informational
messages, so the change in identifiers should be harmless.  The exception
is pci_get_dev_path(), whose results form part of migration streams.  To
maintain compatibility with old migration streams, the PIIX PCI host is
altered to always supply "0000" for this path, which matches the old domain
number (since the code didn't actually support domains other than 0).

For the pseries (spapr) PCI bridge we use a different platform-unique
identifier (pseries machines can routinely have dozens of PCI host
bridges).  Theoretically that breaks migration streams, but given that we
don't yet have migration support for pseries, it doesn't matter.

Any other machines that have working migration support including PCI
devices will need to be updated to maintain migration stream compatibility.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-07-07 23:10:57 +03:00
..
e500-ccsr.h ppc: do not use ../ in include files 2013-03-01 13:57:33 +01:00
e500.c intc/openpic_kvm: Fix QOM and build issues 2013-07-01 01:11:15 +02:00
e500.h PPC: e500: Select MPIC v4.2 on ppce500 platform 2013-01-25 22:02:56 +01:00
e500plat.c PPC: e500: advertise 4.2 MPIC only if KVM supports EPR 2013-04-26 23:02:40 +02:00
mac_newworld.c PPC: Newworld: Add second uninorth control register set 2013-07-01 01:11:17 +02:00
mac_oldworld.c PPC: Add clock-frequency export for Mac machines 2013-07-01 01:11:17 +02:00
mac.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
Makefile.objs hw: move NVRAM interfaces to hw/nvram/, configure with default-configs/ 2013-04-08 18:13:16 +02:00
mpc8544_guts.c mpc8544_guts: Turn qdev initfn into instance_init 2013-07-01 01:11:15 +02:00
mpc8544ds.c hw: move headers to include/ 2013-04-08 18:13:10 +02:00
ppc4xx_devs.c hw: move headers to include/ 2013-04-08 18:13:10 +02:00
ppc4xx_pci.c hw: move PCI bridges to hw/pci-* or hw/ARCH 2013-04-08 18:13:14 +02:00
ppc405_boards.c Remove unneeded type casts 2013-04-19 11:36:33 +02:00
ppc405_uc.c hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
ppc405.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00
ppc440_bamboo.c ppc: Remove CONFIG_FDT conditionals 2013-06-14 15:34:19 +01:00
ppc_booke.c booke_ppc: limit booke timer to max when timeout overflow 2013-07-01 01:11:16 +02:00
ppc.c hw: move headers to include/ 2013-04-08 18:13:10 +02:00
ppce500_spin.c kvm: Change cpu_synchronize_state() argument to CPUState 2013-06-28 13:25:12 +02:00
prep.c cpu: Change cpu_exit() argument to CPUState 2013-06-28 13:25:12 +02:00
spapr_events.c spapr-rtas: add CPU argument to RTAS calls 2013-07-01 01:11:16 +02:00
spapr_hcall.c spapr-rtas: add CPU argument to RTAS calls 2013-07-01 01:11:16 +02:00
spapr_iommu.c spapr_vio: take care of creating our own AddressSpace/DMAContext 2013-06-20 16:32:48 +02:00
spapr_pci.c pci: Replace pci_find_domain() with more general pci_root_bus_path() 2013-07-07 23:10:57 +03:00
spapr_rtas.c spapr-rtas: add CPU argument to RTAS calls 2013-07-01 01:11:16 +02:00
spapr_vio.c spapr-rtas: add CPU argument to RTAS calls 2013-07-01 01:11:16 +02:00
spapr.c pseries: Fix compiler warning (conversion of pointer to integral value) 2013-07-01 01:11:16 +02:00
virtex_ml507.c ppc: Remove CONFIG_FDT conditionals 2013-06-14 15:34:19 +01:00
xics.c spapr-rtas: add CPU argument to RTAS calls 2013-07-01 01:11:16 +02:00