From patchwork Tue Jul 6 11:23:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: pci: pass bridge update to secondary bus From: "Michael S. Tsirkin" X-Patchwork-Id: 57999 Message-Id: <20100706112327.GA20108@redhat.com> To: yamahata@valinux.co.jp, qemu-devel@nongnu.org Cc: Date: Tue, 6 Jul 2010 14:23:27 +0300 bridge config write should trigger updates on the secondary bus. never on the primary bus. Signed-off-by: Michael S. Tsirkin --- Compile-tested only. Isaku Yamahata, could you review this please? You wrote the code, and you seem to have some bridged setups. hw/pci.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 926cf63..011d83e 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -1513,7 +1513,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); } }