diff options
| author | Alex Williamson <alex.williamson@redhat.com> | 2013-03-07 11:29:19 -0700 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2013-03-26 21:02:17 +0200 |
| commit | e5368f0da75c1c668e85398aa930be2f4273e684 (patch) | |
| tree | da955bc5d5c8b71c26268d6ada75dca01846aa03 /hw/pci/pci.c | |
| parent | 600d05b9aa4b4d23775fc17968dd6b581928001d (diff) | |
| download | focaccia-qemu-e5368f0da75c1c668e85398aa930be2f4273e684.tar.gz focaccia-qemu-e5368f0da75c1c668e85398aa930be2f4273e684.zip | |
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: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to '')
| -rw-r--r-- | hw/pci/pci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 8772707b81..f24c389627 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1215,9 +1215,10 @@ 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); - } + } + + QLIST_FOREACH(sec, &bus->child, sibling) { + pci_bus_fire_intx_routing_notifier(sec); } } |