From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMYkH-0002tV-01 for qemu-devel@nongnu.org; Wed, 27 Aug 2014 04:38:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMYkB-0003IO-9P for qemu-devel@nongnu.org; Wed, 27 Aug 2014 04:38:20 -0400 Date: Wed, 27 Aug 2014 18:25:26 +1000 From: David Gibson Message-ID: <20140827082526.GB1930@voom.redhat.com> References: <1408097555-28126-1-git-send-email-aik@ozlabs.ru> <1408097555-28126-12-git-send-email-aik@ozlabs.ru> <20140826071919.GX9923@voom.redhat.com> <53FC4273.2000703@ozlabs.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vGgW1X5XWziG23Ko" Content-Disposition: inline In-Reply-To: <53FC4273.2000703@ozlabs.ru> Subject: Re: [Qemu-devel] [RFC PATCH v2 11/13] spapr_pci_vfio: Enable DDW List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Alex Williamson , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Gavin Shan , Alexander Graf --vGgW1X5XWziG23Ko Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 26, 2014 at 06:16:51PM +1000, Alexey Kardashevskiy wrote: > On 08/26/2014 05:19 PM, David Gibson wrote: > > On Fri, Aug 15, 2014 at 08:12:33PM +1000, Alexey Kardashevskiy wrote: > >> This implements DDW for VFIO. Host kernel support is required for this. > >> > >> Signed-off-by: Alexey Kardashevskiy > >> --- > >> Changes: > >> v2: > >> * remove()/reset() callbacks use spapr_pci's ones > >> --- > >> hw/ppc/spapr_pci_vfio.c | 86 ++++++++++++++++++++++++++++++++++++++++= +++++++++ > >> 1 file changed, 86 insertions(+) > >> > >> diff --git a/hw/ppc/spapr_pci_vfio.c b/hw/ppc/spapr_pci_vfio.c > >> index 11b4272..79df716 100644 > >> --- a/hw/ppc/spapr_pci_vfio.c > >> +++ b/hw/ppc/spapr_pci_vfio.c > >> @@ -71,6 +71,88 @@ static void spapr_phb_vfio_finish_realize(sPAPRPHBS= tate *sphb, Error **errp) > >> spapr_tce_get_iommu(tcet)); > >> =20 > >> object_unref(OBJECT(tcet)); > >> + > >> + if (sphb->ddw_enabled) { > >> + sphb->ddw_enabled =3D !!(info.flags & VFIO_IOMMU_SPAPR_TCE_FL= AG_DDW); > >=20 > > This overrides an explicit ddw=3D set by the user, which is a bit > > counter-intuitive. >=20 >=20 > For the user it is rather "try ddw when available" than "do ddw". This was > suggested by Alex Graf or I misunderstood his suggestion :) Uh.. never mind. I misread this, not spotting the "if" :). --=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 --vGgW1X5XWziG23Ko Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJT/ZX2AAoJEGw4ysog2bOSuCsQAIWYN1yGPwn8UGYzw0sTI8JL P+vM9a6d+gjF0D5nShpMW+YFkU2tCy4j5sTC4jqX7vXF7649mG4d8ILjH58LTw9Z QSx4vgTpEQnO01J4w9ZMIasA5FiwUEqcyyqUZN1/W4PQ1A4m7T2K1sn1EtXd8rTv nZKSbnEOujDP9vuSPhbXzIbyabpOIk9baP+i4dgjRFMFf1mhBorQBgup+EFUNP14 udPa5KxhVUp/KfbMy+wAzW8aN7M6cZWE5zu/AVtLMsRr5fLQrgiueqRUKx2phqrH 0a7B1IPWuZyPEJjIMXL0LoPA8DLmg+Btb+T0hBEYp7JjZ7dldTKhula6dBJPmC8J LEUon5LAhN01Noahmhi1u7VwQxdUdeN+rCT4kak4boWj0JViAJcD5r2ZqsKVd9YB nZsbPbqYxHhptMhg7Oey30Qilq8q1aik8RCt+85F81b9WwjDQy5BUsW4Ey5q/VdW Tlz28xdiQAV9wifHLuTqAyPadGPVQ1k1v62jDUqYjxpXtYJEbhFq0ZSHwrVba9LW uLogQTYf9+6AGouuu12954YPPw8FXbjIssy0/956m9+I6KEijlfBIth/Dqn5JAvS /NjQCXrCSizKhxSsUzLHuD0VW9BGmCCP9rflSPycBdbzXYsoCSp5uhX6Z+PRJIZg 2e7Z6mnT3Ld/q0OUvlxC =Bpq2 -----END PGP SIGNATURE----- --vGgW1X5XWziG23Ko--