Received: from eggs.gnu.org ([2001:4830:134:3::10]:48260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aoLKL-0004DJ-4I for qemu-devel@nongnu.org; Thu, 07 Apr 2016 21:35:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aoLKH-00089m-2i for qemu-devel@nongnu.org; Thu, 07 Apr 2016 21:35:13 -0400 Date: Fri, 8 Apr 2016 11:34:43 +1000 From: David Gibson Message-ID: <20160408013443.GE3332@voom.fritz.box> References: <1459762426-18440-1-git-send-email-aik@ozlabs.ru> <1459762426-18440-16-git-send-email-aik@ozlabs.ru> <20160407005009.GF16485@voom.fritz.box> <570607FD.5090907@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jTMWTj4UTAEmbWeb" Content-Disposition: inline In-Reply-To: <570607FD.5090907@ozlabs.ru> Subject: Re: [Qemu-devel] [PATCH qemu v15 15/17] spapr_pci: Get rid of dma_loibn List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, Alex Williamson , Alexander Graf --jTMWTj4UTAEmbWeb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 07, 2016 at 05:10:53PM +1000, Alexey Kardashevskiy wrote: > On 04/07/2016 10:50 AM, David Gibson wrote: > >s/dma_loibn/dma_liobn/ in subject line. > > > >On Mon, Apr 04, 2016 at 07:33:44PM +1000, Alexey Kardashevskiy wrote: > >>We are going to have 2 DMA windows which LIOBNs are calculated from > >>the PHB index and the window number using the SPAPR_PCI_LIOBN macro > >>so there is no actual use for dma_liobn. > >> > >>This replaces dma_liobn with SPAPR_PCI_LIOBN. This marks it as unused > >>in the migration stream. This renames dma_liobn to _dma_liobn as we have > >>to keep the property for the CLI compatibility and we need a storage > >>for it, although it has never really been used. > >> > >>Signed-off-by: Alexey Kardashevskiy > > > >This doesn't quite make sense. We can't really do that without > >entirely removing support for PHBs without an 'index' value. > >Basically the idea of the PHB config parameters what that you either > >specified just "index" or you specified *all* the relevant addresses. > >Removing option 2 might be a reasonable idea, but it shouldn't just be > >done as a side effect of this other change. With this patch the > >"specify everything" approach still has code, but can't work, because > >such a device will never get a reasonable liobn (or worse, it might > >get a duplicate liobn, because the index isn't verified in this mode). > > > >Then again.. the "index" approach has also bitten us with the problem > >of the not-quite-big-enough MMIO space per-PHB, >=20 > Any new ideas on that front? No, not really :(. > I also keep in mind that we rather want to > assign interrupt numbers pool to a PHB based on its index rather than > allocate them from the global machine interrupt number space so this is o= ne > more vote for keeping the index. True, if we removed the index option we'd have to have the irqs set =66rom a property as well, I think, which would just increase the pain. > >so I'm not entirely > >sure that making it the only choice is the right way to go either. >=20 > I can imagine the user wanting to change MMIO addresses (so they should > remain properties) but changing LIOBN from the command line does not seem > useful at all. Sure, but that doesn't alter the fact that we shouldn't break the no-index option without completely removing the no-index option. > >The short term approach to handle DDW might be to instead add a > >dma64_liobn property. >=20 > So everywhere where I want to have a loop through all TCE tables and use > SPAPR_PCI_LIOBN(index, i), I cannot really do that if I have 2 separate > properties. Not extremely convenient. Hmm.. you could work around that. Inside the structure you could have a liobns[2] array which you step through, then the properties just set the individual elements of the array. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --jTMWTj4UTAEmbWeb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXBwqzAAoJEGw4ysog2bOSZU0P/1f3D+Yyp8bxcBd/69MolMcf XPyvaXEOaYliIFR/8xdUTsShQdzWostOuUQ1MhqBihbRO6TDq0zzuK2SmQWeDmu7 X8h1MGouL5Xm8fqP/xvct1WBq941KqLl0Bo2PR3s9CeviEMi9b1oz4CKdKM/Co3p 5ENlxIbRx4otFWA2mIO2bxyXHYHW2vOYTvLe3PZ8YJVj1lsCaqTzds4CGYXPw7bn LXSyiMnVnDfeLlyLAX8G0xApMvlS34FiqEKYh2cmgBJ//8/zvZsRYGIkoyFjuqg6 Lh+0yyqq/UjIrsMSY+hJAAqKypwSyMaPOrbUvMQor+LmyywCYyYaCrHr698LKigt rnczVLBrQHKvfzt3Y9yOQwZ71ehCwBNKYHxFkPxFqWQ1Ixm2TNaiTuoTS+aM+xZD dEAbCDKqfDrXuax30KQr65XAHLlaIY4/ZTlOUV3dmThBSosrItamnLc2dM0hmnOq 7mnltkXbDTWZ9qNacpjEWDUGF8ZYHV6G69uIbcdd9v+zxOuZ0oinw5r0xwjBZXeP 61h/DGq3NHPy58lq81fi7fGW348eyX8V1i4if95kJM0P/IXtTeYY1EsxTqVWFG6n /h1Xw28xjVeHUNi3g/p9QJ7Wdhm6YUzNMK+NdwG4r9jmoLROiEN7B3SAeSWimC4s WHEyy3OXVzMs2Anybiui =4L2g -----END PGP SIGNATURE----- --jTMWTj4UTAEmbWeb--