qemu/include/hw
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
..
acpi ich9: kill cmos_s3 2013-04-24 11:50:18 -05:00
arm arm: fix location of some include files 2013-04-15 15:16:01 +02:00
audio isa: QOM'ify ISADevice 2013-06-07 14:55:33 +02:00
block fdc: QOM'ify ISA floppy controller 2013-04-29 08:27:47 -05:00
char Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu 2013-06-15 10:53:44 +00:00
cpu target-i386: Move APIC to ICC bus 2013-05-01 13:06:07 +02:00
cris hw: move headers to include/ 2013-04-08 18:13:10 +02:00
i2c hw: move headers to include/ 2013-04-08 18:13:10 +02:00
i386 pvpanic: initialization cleanup 2013-07-04 10:42:51 +03:00
input input: introduce keyboard handler list 2013-04-24 11:50:18 -05:00
isa isa: QOM'ify ISADevice 2013-06-07 14:55:33 +02:00
kvm hw: move headers to include/ 2013-04-08 18:13:10 +02:00
lm32 hw: move headers to include/ 2013-04-08 18:13:10 +02:00
m68k hw: move headers to include/ 2013-04-08 18:13:10 +02:00
mips hw: move headers to include/ 2013-04-08 18:13:10 +02:00
misc hw: move headers to include/ 2013-04-08 18:13:10 +02:00
nvram fw_cfg: add API to find FW cfg object 2013-06-02 18:14:14 +03:00
pci pci: Replace pci_find_domain() with more general pci_root_bus_path() 2013-07-07 23:10:57 +03:00
pci-host pci: store PCI hole ranges in guestinfo structure 2013-07-04 10:40:56 +03:00
ppc PPC: Add clock-frequency export for Mac machines 2013-07-01 01:11:17 +02:00
s390x hw: move headers to include/ 2013-04-08 18:13:10 +02:00
scsi scsi: add bus_name parameter to scsi_bus_new. 2013-05-03 12:05:15 -05:00
sh4 sh7750: Change cpu field type to SuperHCPU 2013-04-13 13:51:45 +02:00
sparc firmware_abi: move to include/hw/nvram/ 2013-06-02 18:13:54 +03:00
timer i8254: Convert PITCommonState to QOM realizefn 2013-06-07 14:55:24 +02:00
unicore32 hw: move headers to include/ 2013-04-08 18:13:10 +02:00
virtio virtio-net: dynamic network offloads configuration 2013-05-22 07:40:10 -05:00
xen xen: remove xen_vcpu_init 2013-06-03 15:41:27 +00:00
boards.h Add hot_add_cpu hook to QEMUMachine 2013-05-01 13:06:07 +02:00
bt.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
devices.h arm: fix location of some include files 2013-04-15 15:16:01 +02:00
elf_ops.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
empty_slot.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
hw.h linux-user: Fix compilation failure 2013-06-27 15:38:35 -05:00
ide.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
irq.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
loader.h refer to FWCfgState explicitly 2013-06-02 18:14:02 +03:00
pcmcia.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
ptimer.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
qdev-core.h qdev: Drop FROM_QBUS() macro 2013-06-07 14:55:33 +02:00
qdev-dma.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
qdev-properties.h qdev: Introduce qdev_prop_set_globals_for_type() 2013-05-06 19:50:52 +02:00
qdev.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
sd.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
ssi.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
stream.h Trivial grammar and spelling fixes 2013-05-01 20:55:21 +04:00
sysbus.h hw: move headers to include/ 2013-04-08 18:13:10 +02:00
usb.h usb: add serial bus property 2013-06-24 08:41:07 +02:00
xilinx.h stream: Remove app argument hack 2013-04-16 10:04:23 +02:00