From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfaNK-0005DB-Hr for qemu-devel@nongnu.org; Thu, 23 May 2013 14:36:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfaEr-0005sA-Bs for qemu-devel@nongnu.org; Thu, 23 May 2013 14:28:39 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:38222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfaEr-0005s1-2Z for qemu-devel@nongnu.org; Thu, 23 May 2013 14:27:45 -0400 Received: by mail-lb0-f174.google.com with SMTP id u10so3780256lbi.19 for ; Thu, 23 May 2013 11:27:44 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1369133851-1894-22-git-send-email-pbonzini@redhat.com> References: <1369133851-1894-1-git-send-email-pbonzini@redhat.com> <1369133851-1894-22-git-send-email-pbonzini@redhat.com> From: Peter Maydell Date: Thu, 23 May 2013 19:27:23 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 21/30] memory: Add iommu map/unmap notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: jan.kiszka@gmail.com, qemu-devel@nongnu.org, David Gibson On 21 May 2013 11:57, Paolo Bonzini wrote: > From: David Gibson > > This patch adds a NotifierList to MemoryRegions which represent IOMMUs > allowing other parts of the code to register interest in mappings or > unmappings from the IOMMU. All IOMMU implementations will need to call > memory_region_notify_iommu() to inform those waiting on the notifier list, > whenever an IOMMU mapping is made or removed. > > Signed-off-by: David Gibson > @@ -423,6 +425,11 @@ static inline bool memory_region_is_romd(MemoryRegion *mr) > */ > bool memory_region_is_iommu(MemoryRegion *mr); > > +void memory_region_notify_iommu(MemoryRegion *mr, > + IOMMUTLBEntry entry); > +void memory_region_register_iommu_notifier(MemoryRegion *mr, Notifier *n); > +void memory_region_unregister_iommu_notifier(Notifier *n); These all need doc comments. The code looks good. thanks -- PMM