pci_bridge: use parent bus's address space
commit778d1799397e1353b69f16547d359f944fb49ea6
authorWen Congyang <wency@cn.fujitsu.com>
Fri, 26 Aug 2011 10:00:33 +0000 (26 13:00 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 19 Sep 2011 18:22:30 +0000 (19 21:22 +0300)
treed79b0bbaa0debdfa4306abb3eeb8ff2b385e32fa
parenta92eb87a4463230620e14e4f1b19a740be4058c3
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>
hw/pci_bridge.c