From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJdvH-0000kS-5c for qemu-devel@nongnu.org; Mon, 27 Jul 2015 04:38:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJdvD-0005jr-VF for qemu-devel@nongnu.org; Mon, 27 Jul 2015 04:38:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJdvD-0005jk-NX for qemu-devel@nongnu.org; Mon, 27 Jul 2015 04:38:07 -0400 Date: Mon, 27 Jul 2015 10:38:02 +0200 From: Igor Mammedov Message-ID: <20150727103802.0afec7fe@nial.brq.redhat.com> In-Reply-To: <019401d0c601$14d2a340$3e77e9c0$@samsung.com> References: <019401d0c601$14d2a340$3e77e9c0$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] hw/arm/virt: Add high MMIO PCI region, 2G in size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Fedin Cc: 'Peter Maydell' , pbonzini@redhat.com, qemu-devel@nongnu.org, 'Alexander Graf' On Fri, 24 Jul 2015 14:08:33 +0300 Pavel Fedin wrote: > This large region is necessary for some devices like ivshmem and video cards > > Signed-off-by: Pavel Fedin Looks like this patch misses respective ACPI hunks, Cold you add them to hw/arm/virt-acpi-build.c:acpi_dsdt_add_pci(), pls? > --- > Changes since v1: > - Region address changed to 512G, leaving more space for RAM > --- > hw/arm/virt.c | 13 ++++++++++++- > include/hw/arm/virt.h | 1 + > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index e53ef4c..2e1ac21 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -124,6 +124,7 @@ static const MemMapEntry a15memmap[] = { > [VIRT_PCIE_PIO] = { 0x3eff0000, 0x00010000 }, > [VIRT_PCIE_ECAM] = { 0x3f000000, 0x01000000 }, > [VIRT_MEM] = { 0x40000000, 30ULL * 1024 * 1024 * 1024 }, > + [VIRT_PCIE_MMIO_HIGH] = { 0x8000000000, 0x80000000 }, > }; > > static const int a15irqmap[] = { > @@ -758,6 +759,8 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic) > hwaddr size_pio = vbi->memmap[VIRT_PCIE_PIO].size; > hwaddr base_ecam = vbi->memmap[VIRT_PCIE_ECAM].base; > hwaddr size_ecam = vbi->memmap[VIRT_PCIE_ECAM].size; > + hwaddr base_mmio_high = vbi->memmap[VIRT_PCIE_MMIO_HIGH].base; > + hwaddr size_mmio_high = vbi->memmap[VIRT_PCIE_MMIO_HIGH].size; > hwaddr base = base_mmio; > int nr_pcie_buses = size_ecam / PCIE_MMCFG_SIZE_MIN; > int irq = vbi->irqmap[VIRT_PCIE]; > @@ -793,6 +796,12 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic) > /* Map IO port space */ > sysbus_mmio_map(SYS_BUS_DEVICE(dev), 2, base_pio); > > + /* High MMIO space */ > + mmio_alias = g_new0(MemoryRegion, 1); > + memory_region_init_alias(mmio_alias, OBJECT(dev), "pcie-mmio-high", > + mmio_reg, base_mmio_high, size_mmio_high); > + memory_region_add_subregion(get_system_memory(), base_mmio_high, mmio_alias); > + > for (i = 0; i < GPEX_NUM_IRQS; i++) { > sysbus_connect_irq(SYS_BUS_DEVICE(dev), i, pic[irq + i]); > } > @@ -818,7 +827,9 @@ static void create_pcie(const VirtBoardInfo *vbi, qemu_irq *pic) > 1, FDT_PCI_RANGE_IOPORT, 2, 0, > 2, base_pio, 2, size_pio, > 1, FDT_PCI_RANGE_MMIO, 2, base_mmio, > - 2, base_mmio, 2, size_mmio); > + 2, base_mmio, 2, size_mmio, > + 1, FDT_PCI_RANGE_MMIO, 2, base_mmio_high, > + 2, base_mmio_high, 2, size_mmio_high); > > qemu_fdt_setprop_cell(vbi->fdt, nodename, "#interrupt-cells", 1); > create_pcie_irq_map(vbi, vbi->gic_phandle, irq, nodename); > diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h > index 852efb9..1d43598 100644 > --- a/include/hw/arm/virt.h > +++ b/include/hw/arm/virt.h > @@ -60,6 +60,7 @@ enum { > VIRT_PCIE_PIO, > VIRT_PCIE_ECAM, > VIRT_PLATFORM_BUS, > + VIRT_PCIE_MMIO_HIGH, > }; > > typedef struct MemMapEntry {