pci: Abolish pci_find_root_bus()

pci_find_root_bus() takes a domain parameter.  Currently PCI root buses
with domain other than 0 can't be created, so this is more or less a long
winded way of retrieving the main PCI root bus.  Numbered domains don't
actually properly cover the (non x86) possibilities for multiple PCI root
buses, so this patch for now enforces the domain == 0 restriction in other
places to replace pci_find_root_bus() with an explicit
pci_find_primary_bus().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
David Gibson 2013-06-06 18:48:47 +10:00 committed by Michael S. Tsirkin
parent 6ac363b50c
commit 1ef7a2a2af
4 changed files with 42 additions and 15 deletions

View file

@ -342,7 +342,7 @@ static void pc_xen_hvm_init(QEMUMachineInitArgs *args)
pc_init_pci(args);
bus = pci_find_root_bus(0);
bus = pci_find_primary_bus();
if (bus != NULL) {
pci_create_simple(bus, -1, "xen-platform");
}