From aee97b840fd0362594c954af750491fafad66a3d Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 8 Aug 2011 16:09:04 +0300 Subject: pci: pass I/O address space to new PCI bus This lets us register BARs in the I/O address space. Reviewed-by: Richard Henderson Reviewed-by: Anthony Liguori Signed-off-by: Avi Kivity Signed-off-by: Anthony Liguori --- hw/piix_pci.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'hw/piix_pci.c') diff --git a/hw/piix_pci.c b/hw/piix_pci.c index 80d6665350..28a3ee2e9c 100644 --- a/hw/piix_pci.c +++ b/hw/piix_pci.c @@ -242,7 +242,8 @@ static PCIBus *i440fx_common_init(const char *device_name, PCII440FXState **pi440fx_state, int *piix3_devfn, qemu_irq *pic, - MemoryRegion *address_space, + MemoryRegion *address_space_mem, + MemoryRegion *address_space_io, ram_addr_t ram_size) { DeviceState *dev; @@ -253,8 +254,9 @@ static PCIBus *i440fx_common_init(const char *device_name, dev = qdev_create(NULL, "i440FX-pcihost"); s = FROM_SYSBUS(I440FXState, sysbus_from_qdev(dev)); - s->address_space = address_space; - b = pci_bus_new(&s->busdev.qdev, NULL, s->address_space, 0); + s->address_space = address_space_mem; + b = pci_bus_new(&s->busdev.qdev, NULL, s->address_space, + address_space_io, 0); s->bus = b; qdev_init_nofail(dev); @@ -291,13 +293,15 @@ static PCIBus *i440fx_common_init(const char *device_name, } PCIBus *i440fx_init(PCII440FXState **pi440fx_state, int *piix3_devfn, - qemu_irq *pic, MemoryRegion *address_space, + qemu_irq *pic, + MemoryRegion *address_space_mem, + MemoryRegion *address_space_io, ram_addr_t ram_size) { PCIBus *b; b = i440fx_common_init("i440FX", pi440fx_state, piix3_devfn, pic, - address_space, ram_size); + address_space_mem, address_space_io, ram_size); return b; } -- cgit 1.4.1