From 3edf6e0b1b646a358ae14c64e726ad24350ad510 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Tue, 4 Feb 2014 12:54:53 -0500 Subject: [PATCH 1/6] pci: On PCI dump keyhandler include bus2bridge information As it helps in figuring out whether they match reality if the initial domain has altered the bus topology. Signed-off-by: Konrad Rzeszutek Wilk --- xen/drivers/passthrough/pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index c5c8344..64dfd73 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -942,6 +942,7 @@ static int _dump_pci_devices(struct pci_seg *pseg, void *arg) { struct pci_dev *pdev; struct msi_desc *msi; + int i; printk("==== segment %04x ====\n", pseg->nr); @@ -955,6 +956,17 @@ static int _dump_pci_devices(struct pci_seg *pseg, void *arg) printk("%d ", msi->irq); printk(">\n"); } + printk("==== Bus2Bridge %04x ====\n", pseg->nr); + spin_lock(&pseg->bus2bridge_lock); + for ( i = 0; i < MAX_BUSES; i++) + { + if ( !pseg->bus2bridge[i].map ) + continue; + printk("%02x -> %02x:%02x.%u\n", i, pseg->bus2bridge[i].bus, + PCI_SLOT(pseg->bus2bridge[i].devfn), + PCI_FUNC(pseg->bus2bridge[i].devfn)); + } + spin_unlock(&pseg->bus2bridge_lock); return 0; } -- 1.8.3.1