From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBljM-0000Rt-M4 for qemu-devel@nongnu.org; Fri, 07 Feb 2014 08:44:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WBljF-0001JQ-U3 for qemu-devel@nongnu.org; Fri, 07 Feb 2014 08:44:32 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:37417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WBljF-0001JC-LW for qemu-devel@nongnu.org; Fri, 07 Feb 2014 08:44:25 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 7 Feb 2014 13:44:23 -0000 From: Greg Kurz Date: Fri, 07 Feb 2014 14:44:17 +0100 Message-ID: <20140207134252.24451.65306.stgit@bahia.local> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH] spapr-pci: remove io ports workaround List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aik@ozlabs.ru, agraf@suse.de Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org In the past, IO space could not be mapped into the memory address space so we introduced a workaround for that. Nowadays it does not look necessary so we can remove the workaround and make sPAPR PCI configuration simplier. Signed-off-by: Greg Kurz --- There has been a previous post for this patch: http://patchwork.ozlabs.org/patch/299123/ Since then, things have evolved: - the kvm_mem_ioeventfd_add failure was fixed by the "KVM: fix addr type for KVM_IOEVENTFD" commit (584f2be). - Alexey's NACK got addressed in SLOF: https://github.com/aik/SLOF/commit/020220e Cheers. -- Greg hw/ppc/spapr_pci.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 66ddf10..3b7d978 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -564,23 +564,14 @@ static int spapr_phb_init(SysBusDevice *s) memory_region_add_subregion(get_system_memory(), sphb->mem_win_addr, &sphb->memwindow); - /* On ppc, we only have MMIO no specific IO space from the CPU - * perspective. In theory we ought to be able to embed the PCI IO - * memory region direction in the system memory space. However, - * if any of the IO BAR subregions use the old_portio mechanism, - * that won't be processed properly unless accessed from the - * system io address space. This hack to bounce things via - * system_io works around the problem until all the users of - * old_portion are updated */ + /* Initialize IO regions */ sprintf(namebuf, "%s.io", sphb->dtbusname); memory_region_init(&sphb->iospace, OBJECT(sphb), namebuf, SPAPR_PCI_IO_WIN_SIZE); - /* FIXME: fix to support multiple PHBs */ - memory_region_add_subregion(get_system_io(), 0, &sphb->iospace); sprintf(namebuf, "%s.io-alias", sphb->dtbusname); memory_region_init_alias(&sphb->iowindow, OBJECT(sphb), namebuf, - get_system_io(), 0, SPAPR_PCI_IO_WIN_SIZE); + &sphb->iospace, 0, SPAPR_PCI_IO_WIN_SIZE); memory_region_add_subregion(get_system_memory(), sphb->io_win_addr, &sphb->iowindow); /*