提交 e5368f0d 编写于 作者: A Alex Williamson 提交者: Michael S. Tsirkin

pci: Fix INTx routing notifier recursion

For some reason we recurse to fire the INTx routing notifier for each
child of a bus, for each possible device of a bus.  That means that if
we add a root port, the notifier gets called for that bridge 256
times.  If we add an upstream switch behind that root port, 256^2.  But
of course we need a downstream switch, 256^3.  This starts to be
noticeable.  Stop the insanity.
Signed-off-by: NAlex Williamson <alex.williamson@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 600d05b9
......@@ -1215,10 +1215,11 @@ void pci_bus_fire_intx_routing_notifier(PCIBus *bus)
if (dev && dev->intx_routing_notifier) {
dev->intx_routing_notifier(dev);
}
}
QLIST_FOREACH(sec, &bus->child, sibling) {
pci_bus_fire_intx_routing_notifier(sec);
}
}
}
void pci_device_set_intx_routing_notifier(PCIDevice *dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册