From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZglyJ-0003Vk-C3 for qemu-devel@nongnu.org; Mon, 28 Sep 2015 23:52:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZglyF-00060t-4P for qemu-devel@nongnu.org; Mon, 28 Sep 2015 23:52:55 -0400 Date: Tue, 29 Sep 2015 13:30:33 +1000 From: David Gibson Message-ID: <20150929033033.GA19428@voom.redhat.com> References: <1443069231-14856-1-git-send-email-david@gibson.dropbear.id.au> <1443069231-14856-6-git-send-email-david@gibson.dropbear.id.au> <56052DEC.6040500@redhat.com> <20150925113349.GL11620@voom.redhat.com> <5605383E.1090406@redhat.com> <20150926065414.GM11620@voom.redhat.com> <56090157.2000903@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: <56090157.2000903@redhat.com> Subject: Re: [Qemu-devel] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: lvivier@redhat.com, thuth@redhat.com, qemu-devel@nongnu.org, abologna@redhat.com, alex.williamson@redhat.com, qemu-ppc@nongnu.org --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 28, 2015 at 10:59:03AM +0200, Paolo Bonzini wrote: >=20 >=20 > On 26/09/2015 08:54, David Gibson wrote: > > On Fri, Sep 25, 2015 at 02:04:14PM +0200, Paolo Bonzini wrote: > >> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 > >>=20 > >>=20 > >>=20 > >> On 25/09/2015 13:33, David Gibson wrote: > >>> 1) Is there a case where using the no-replay functions makes=20 > >>> sense? > >>>=20 > >>> I'm not sure. I think vfio is the only user so far, so I > >>> guess that's technically a no. I was reluctant to change the > >>> interface and semantics just off the bat, though. > >>=20 > >> Considering memory_region_listener does the reply, I think it's=20 > >> okay. > >=20 > > Uh.. just to be clear, are you saying I should change this so > > there's only the replaying interface? >=20 > Maybe... The only issue is the "granularity" argument, which is > not in memory_region_register_iommu_notifier. That makes me wonder if > the replay and registration make sense as separate operations. >=20 > What about adding a new function memory_region_iommu_replay and > separate the two phases? Hm.. I'm not sure I see much advantage to separating the phases. But I don't particularly object to the idea either. So, I think it's your call. > >> For solving the problem that Laurent mentioned, using int128 > >> seems like the easiest solution... > >=20 > > Maybe. It means I have to do all the address calculation in the > > loop with an int128, then truncate it to do the actual call. That > > seems harder to me than the overflow check I added, but I suppose > > it's conceptually similar in some ways. >=20 > Your overflow check is also okay, I wrote this before seeing the > updated version. >=20 > Paolo >=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 --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWCgXZAAoJEGw4ysog2bOS9ekQANnRxcAvmitkgE2UULSZTupm pK9Lq7KlZ8ilUKRP5TiTcJgM+nG3BrwhIpu5fUgla5Vel+rPEavzJbE21IzEwugH r9asqMwWTaQLDlH2y3Jp4SG/sNFoE/kAP2r+JrTqMJpJQrowVOfN9im5zI/nKadj hsrcTJnEbztR7OnshXGjwwJibSpvZoyhRuHNXwmFR/99yjK5vuyVHfklSPXTd/Uo q1EpHSCjTsQF+1JgYilaUsCc53hcjWsshDeXp9x4D15TiAnwOQRN9bW57DCxTz6i 8eL7WobesbBaX1jhdwo9ptWVmegpL/4IDYd9H7HDoSDyQmV3RUijakrQWK91548D XeBDu7ONdEHrorvtOg4MESeDTger/I2x3tVcma+KOGEApnoXWnQcGphD3jtxoNG7 vAtHAHCQ1fcXeGJsZdMQYHE9uQc9tLIrbmljLhoaEsC+slT7fghUWyVmRbd8+ZNu utTf7bSuLkofvcwnlr/tC5kopNW+dcknEfjnOXzQ/Pac5NZeEwJiqg4NlQDy6cYM E+rSdiQrvD067FbC+Dc+ihNGyk0VXS6NnDokn6iyWBU0Rj9B9iFebvq6loQbxkNq PpxackdKU3Q9rjW/KVkhIpgn2QzlvWUNyJV4sHLkIv0uSnJTwOLH5Se7Bm1XI5AV YRs2jlBwXAfoSFaYseIr =UILA -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--