From: Michael S. Tsirkin Date: Tue, 6 Jul 2010 11:17:51 +0000 (+0300) Subject: pci: fix bridge update X-Git-Tag: v0.13.0-rc0~67^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=eb0557dbd1c045b57f1fa1ed5c2d22fbfd667583;p=qemu.git 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 --- diff --git a/hw/pci.c b/hw/pci.c index fbba6e38f..a98d6f3ad 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); } }