A unique bus name is necessary to be able to refer to each instance
from the command line and monitors.

Signed-off-by: Knut Omang <knut.om...@oracle.com>
---
 hw/pci-bridge/ioh3420.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c
index 7cd87fc..8f6c8b0 100644
--- a/hw/pci-bridge/ioh3420.c
+++ b/hw/pci-bridge/ioh3420.c
@@ -95,6 +95,9 @@ static int ioh3420_initfn(PCIDevice *d)
     PCIEPort *p = PCIE_PORT(d);
     PCIESlot *s = PCIE_SLOT(d);
     int rc;
+    char tmp[100];
+    sprintf(tmp, "pcie_port.%d", s->slot);
+    pci_bridge_map_irq(br, g_strdup(tmp), pci_swizzle_map_irq_fn);
 
     rc = pci_bridge_initfn(d, TYPE_PCIE_BUS);
     if (rc < 0) {
@@ -154,6 +157,7 @@ static void ioh3420_exitfn(PCIDevice *d)
     pcie_cap_exit(d);
     msi_uninit(d);
     pci_bridge_exitfn(d);
+    g_free((char*)br->bus_name);
 }
 
 PCIESlot *ioh3420_init(PCIBus *bus, int devfn, bool multifunction,
-- 
1.9.0



Reply via email to