From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk5Nx-0003Iv-Je for qemu-devel@nongnu.org; Wed, 14 Sep 2016 04:17:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bk5Nv-0001zU-Lp for qemu-devel@nongnu.org; Wed, 14 Sep 2016 04:17:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bk5Nv-0001zF-Fe for qemu-devel@nongnu.org; Wed, 14 Sep 2016 04:17:35 -0400 Date: Wed, 14 Sep 2016 16:17:26 +0800 From: Peter Xu Message-ID: <20160914081726.GP3776@pxdev.xzpeter.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160914071503.GO15077@voom.fritz.box> 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: David Gibson 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 On Wed, Sep 14, 2016 at 05:15:03PM +1000, David Gibson wrote: [...] > Peter suggested commenting this next to the IOTLBEntry definition, and > I think that's probably ok for now. Looks like we have something already (just not that obvious): /** * memory_region_notify_iommu: notify a change in an IOMMU translation entry. * * @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 range. * Deleted entries have .@perm == 0. */ void memory_region_notify_iommu(MemoryRegion *mr, IOMMUTLBEntry entry); Though it's quite simple, it did explain that perm==0 is for deleted entries. Thanks, -- peterx