summary refs log tree commit diff stats
path: root/hw/pci.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2010-07-06 14:17:51 +0300
committerMichael S. Tsirkin <mst@redhat.com>2010-07-11 23:31:52 +0300
commiteb0557dbd1c045b57f1fa1ed5c2d22fbfd667583 (patch)
tree7a9aab79134812d593e3487f32a031902fdd3465 /hw/pci.c
parent279a42535dc977c495bdbda8c8831016e05a0a5d (diff)
downloadfocaccia-qemu-eb0557dbd1c045b57f1fa1ed5c2d22fbfd667583.tar.gz
focaccia-qemu-eb0557dbd1c045b57f1fa1ed5c2d22fbfd667583.zip
pci: fix bridge update
bridge config write should trigger updates
on the secondary bus. never on the primary bus.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/pci.c b/hw/pci.c
index fbba6e38fe..a98d6f3ad1 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1568,7 +1568,9 @@ static void pci_bridge_write_config(PCIDevice *d,
         /* memory base/limit, prefetchable base/limit and
            io base/limit upper 16 */
         ranges_overlap(address, len, PCI_MEMORY_BASE, 20)) {
-        pci_bridge_update_mappings(d->bus);
+        PCIBridge *s = container_of(d, PCIBridge, dev);
+        PCIBus *secondary_bus = &s->bus;
+        pci_bridge_update_mappings(secondary_bus);
     }
 }