>From ac79b6cdd20765d30adbff40514e729a2c33e74e Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Tue, 4 Feb 2014 17:01:42 -0500 Subject: [PATCH 2/5] DEBUG: Include upstream bridge information. Signed-off-by: Konrad Rzeszutek Wilk --- xen/drivers/passthrough/pci.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c index 5e5097e..ae6df78 100644 --- a/xen/drivers/passthrough/pci.c +++ b/xen/drivers/passthrough/pci.c @@ -1213,6 +1213,9 @@ static int _dump_pci_devices(struct pci_seg *pseg, void *arg) { int id = pci_conf_read32(pseg->nr, pdev->bus, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), 0); + int rc = 0; + u8 bus, devfn, secbus; + printk("%04x:%02x:%02x.%u (%04x:%04x)- dom %-3d - node %-3d - MSIs < ", pseg->nr, pdev->bus, PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), @@ -1221,7 +1224,14 @@ static int _dump_pci_devices(struct pci_seg *pseg, void *arg) (pdev->node != NUMA_NO_NODE) ? pdev->node : -1); list_for_each_entry ( msi, &pdev->msi_list, list ) printk("%d ", msi->irq); - printk(">\n"); + bus = pdev->bus; + devfn = pdev->devfn; + + rc = find_upstream_bridge( pseg->nr, &bus, &devfn, &secbus ); + if ( rc < 0) + printk(">\n"); + else + printk(">[%02x:%02x.%u]\n", bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); } printk("==== Bus2Bridge %04x ====\n", pseg->nr); spin_lock(&pseg->bus2bridge_lock); -- 2.5.5