Received: from eggs.gnu.org ([2001:4830:134:3::10]:33410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMqB7-0007cq-Eu for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:24:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMqB3-0006C0-6D for qemu-devel@nongnu.org; Tue, 12 Jul 2016 01:24:16 -0400 Date: Tue, 12 Jul 2016 15:20:21 +1000 From: David Gibson Message-ID: <20160712052021.GW16355@voom.fritz.box> References: <1467696699-8941-1-git-send-email-david@gibson.dropbear.id.au> <1467696699-8941-9-git-send-email-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="7uidztUHYC105IRM" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PULL 08/14] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.maydell@linaro.org, aik@ozlabs.ru, agraf@suse.de, qemu-devel@nongnu.org, alex.williamson@redhat.com, qemu-ppc@nongnu.org --7uidztUHYC105IRM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 11, 2016 at 04:21:29PM +0200, Paolo Bonzini wrote: >=20 >=20 > On 05/07/2016 07:31, David Gibson wrote: > > =20 > > - if (tcet && tcet->nb_table) { > > - spapr_tce_table_disable(tcet); > > + if (tcet && tcet->nb_table) { > > + spapr_tce_table_disable(tcet); > > + } > > } > > =20 > > /* Register default 32bit DMA window */ > > + tcet =3D spapr_tce_find_by_liobn(sphb->dma_liobn[0]); >=20 > Should the statement below be wrapped by "if (tcet)"? Not really. That lookup should never fail (if we didn't allocate the tcet before we would have failed initialization). An assert(tcet) might be appropriate, but I don't know it's worth adding at this stage. =20 > Paolo >=20 > > spapr_tce_table_enable(tcet, SPAPR_TCE_PAGE_SHIFT, sphb->dma_win_a= ddr, > > sphb->dma_win_size >> SPAPR_TCE_PAGE_SHIFT) >=20 --=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 --7uidztUHYC105IRM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXhH4VAAoJEGw4ysog2bOShiIQANGCqRzZNcmCGUut3xc67rAo AD+LDkigCfymRXbx/VFi0tymx4cDSSqTWMrksR56+irjtu8ePC3OZ5UGavT/K7z4 KW2SuH16/4ZamLSEJuSjfuMd7UOR8FLfRcYP83Dh0pxJWo2Anngo6DD5T7Mqc8Q5 XDEh+S2/ongjCOpC6D7o1HyfUmmCuo3J8+3boxoPMYCuce7OFIrlXc4TjEaMZs8P NZn6EMh5yAI3cSDvVhGjGJ8o5pkT2j+gmRHl/qZ6qoxGlNb60rn2pJI2tasQojQR Qjlt2sIvwTGQTf4fFF90CQyyW0FwTQbbVEFrj9UDIbHBmEnyoPDxb6gwlWsoJfMP Ur2MpEKQrOSfNh2eyMpjnWL2aLt3utyNj9l0d5kMbMiniwbbyeWigsxho4GV5KxI AXZ7HNyEpBTar26K3EFD144mA+SSLcreraTPNmaC5+zyM6Q2G7NkMEP/SxTm9eZS FEm8+0SqURDtvf7tW5q4an4PeT92ouLN3gLJMPJN2fSQ+6D2mbfklX8o7qAGiANY Zn8Kzk6XKZA8ZINaSUsxELFh7Rk6S6cEf+L9NXcviCsSGdO6ZrrTEQgJ5K5sSU35 Vft4HXvLspiH5ie2JiM23SzYl0oWggv1xlnjAlHFdZu1WZgEv7R59wDvIX3Bbi07 vKZgTQgWphN9UH+pl3GW =qbdy -----END PGP SIGNATURE----- --7uidztUHYC105IRM--