From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk7nm-0000wh-Gf for qemu-devel@nongnu.org; Wed, 14 Sep 2016 06:52:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bk7ni-0002U5-BF for qemu-devel@nongnu.org; Wed, 14 Sep 2016 06:52:25 -0400 Received: from ozlabs.org ([103.22.144.67]:45249) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk7nh-0002Tr-Ug for qemu-devel@nongnu.org; Wed, 14 Sep 2016 06:52:22 -0400 Date: Wed, 14 Sep 2016 20:50:38 +1000 From: David Gibson Message-ID: <20160914105038.GS15077@voom.fritz.box> References: <1473389864-19694-1-git-send-email-peterx@redhat.com> <1473389864-19694-2-git-send-email-peterx@redhat.com> <20160914054832.GL15077@voom.fritz.box> <20160914071503.GO15077@voom.fritz.box> <20160914081726.GP3776@pxdev.xzpeter.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WfjJTYUClXDJCnRl" Content-Disposition: inline In-Reply-To: <20160914081726.GP3776@pxdev.xzpeter.org> Subject: Re: [Qemu-devel] [PATCH v4 1/3] memory: introduce IOMMUNotifier and its caps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Xu Cc: mst@redhat.com, jasowang@redhat.com, qemu-devel@nongnu.org, cornelia.huck@de.ibm.com, alex.williamson@redhat.com, wexu@redhat.com, dgibson@redhat.com, vkaplans@redhat.com, pbonzini@redhat.com --WfjJTYUClXDJCnRl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 14, 2016 at 04:17:26PM +0800, Peter Xu wrote: > On Wed, Sep 14, 2016 at 05:15:03PM +1000, David Gibson wrote: >=20 > [...] >=20 > > Peter suggested commenting this next to the IOTLBEntry definition, and > > I think that's probably ok for now. >=20 > Looks like we have something already (just not that obvious): >=20 > /** > * memory_region_notify_iommu: notify a change in an IOMMU translation en= try. > * > * @mr: the memory region that was changed > * @entry: the new entry in the IOMMU translation table. The entry > * replaces all old entries for the same virtual I/O address rang= e. > * Deleted entries have .@perm =3D=3D 0. > */ > void memory_region_notify_iommu(MemoryRegion *mr, > IOMMUTLBEntry entry); >=20 > Though it's quite simple, it did explain that perm=3D=3D0 is for deleted > entries. That is definitely not sufficient. It misses the crucial point is that @perm !=3D 0 is NOT ALLOWED if there was an existing mapping at that address. It's not that we really _need_ to support in-place change. The point is that we want to keep our interface contracts simple and clear. --=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 --WfjJTYUClXDJCnRl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJX2St+AAoJEGw4ysog2bOSg6EP/A1g8P97mDo4QERO9wcXMYdL QVefcDCNqFfCUw34x9ELaEqJBUvM5Cvs8rHU7q7Cn2ChmoRpSH5XKrzgNJ4GIRPp CH1eJmLEyGwr3FZRFOygfzn+0cK+j4vEaPhfnW5+GZtpBZd17J1gPwOq69OcoxRv Q5o1LHdqVyqQG+xFme2SGdt10s100EB0WKo6Fvac2DtvdX5xVole1kTciq6DUPOY rqPGR47pX45Ate9oxDuCsPNGnmhtoQ1UYcVCFANM7zAunmdMPyUPVYmP7omRuD+U h3aPz+EPstxB64cGhTFL2CfwiPv7Z9RpOPVl8M5hev6nNvHELL+4syz8tAu+Bf14 o/EphGiwQFcuG8KVHMwx/qNC2Wzkw9bY+9gX6HHM8Oh/DRzqGUsO47EHJ4dhEtoF kOupdlU2whI7gvrJQXlIHmGwxSE0UYMLAV0ykMgfkfDCUOFmtO8M+j2wv3jR4MWf v8nlB2TSxe3a1f187ez0VjytFS284P4o/PIGmvWBbvktYS9qmI56cR+Yez/GsoDj DSC1Ijib94+kNI8xmoj0oRvGCapAOa5C1dm/2WnIFea607CF3lU1GLoHrumaIpRm /DYpt2FibQ2f1UP2SQLoXdGR+a+eh1sNwIiwUOTmnl4IuzNMvqtG9+hEW3L5/IuY EJGEL2bB25ABGcWyMUNF =idz1 -----END PGP SIGNATURE----- --WfjJTYUClXDJCnRl--