From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: question on iommu _map_page Date: Fri, 11 Jun 2010 09:32:50 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kaushik Kumar Ram Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 10/06/2010 22:59, "Kaushik Kumar Ram" wrote: >> Actually I've implemented the better fix as xen-unstable:21476. Hope that >> works okay for you. > > > Checking if act->pin is zero before calling iommu_unmap_page() (in > grant_table.c) is not sufficient since there can be multiple > active grants all referring to the same mfn. In fact I came across iommu page > faults because pages were > getting unmapped from the IOMMU when active grants referring to these pages > were still around. > Ideally, there needs to be a per-page count of how many IOMMU mappings exists > for a page. > I can't think of an obvious fix for this problem. For my purposes, I hacked > page_info to add another counter which I guess is not an acceptable solution! See if xen-unstable:21597 works for you. -- Keir