summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorWen Congyang <wency@cn.fujitsu.com>2011-08-26 13:00:33 +0300
committerMichael S. Tsirkin <mst@redhat.com>2011-09-19 21:22:30 +0300
commit778d1799397e1353b69f16547d359f944fb49ea6 (patch)
treed79b0bbaa0debdfa4306abb3eeb8ff2b385e32fa /hw
parenta92eb87a4463230620e14e4f1b19a740be4058c3 (diff)
downloadhqemu-778d1799397e1353b69f16547d359f944fb49ea6.zip
hqemu-778d1799397e1353b69f16547d359f944fb49ea6.tar.gz
pci_bridge: use parent bus's address space
The switch to the new memory API caused the following problem: The pci device may call pci_register_bar() to use PCI bus's address space. But we don't init PCI bus's address space if it is not bus 0. A crash was reported: http://lists.gnu.org/archive/html/qemu-devel/2011-08/msg02243.html More work will be needed to make bridge filtering work correctly with the memory API. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci_bridge.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/pci_bridge.c b/hw/pci_bridge.c
index 464d897..e0b339e 100644
--- a/hw/pci_bridge.c
+++ b/hw/pci_bridge.c
@@ -246,6 +246,9 @@ int pci_bridge_initfn(PCIDevice *dev)
br->bus_name);
sec_bus->parent_dev = dev;
sec_bus->map_irq = br->map_irq;
+ /* TODO: use memory API to perform memory filtering. */
+ sec_bus->address_space_mem = parent->address_space_mem;
+ sec_bus->address_space_io = parent->address_space_io;
QLIST_INIT(&sec_bus->child);
QLIST_INSERT_HEAD(&parent->child, sec_bus, sibling);
OpenPOWER on IntegriCloud