From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [RFC] fix xen_in_range() Date: Thu, 23 Apr 2009 08:25:26 +0100 Message-ID: References: <4F65016F6CB04E49BFFA15D4F7B798D9988CF1A3@orsmsx506.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F65016F6CB04E49BFFA15D4F7B798D9988CF1A3@orsmsx506.amr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Cihula, Joseph" , "xen-devel@lists.xensource.com" Cc: "Cui, Dexuan" , "Wang, Shane" , "Jiang, Yunhong" , "Yang, Xiaowei" , "Ke, Liping" , "Li, Xin" List-Id: xen-devel@lists.xenproject.org On 23/04/2009 00:53, "Cihula, Joseph" wrote: > Unfortunately, the frametable is only contiguous in the virtual address space, > so one can't simply take __pa() of its start and end. And since it is quite > large, iterating through each page to gets its phys addr adds a perceptible > delay when that check has to be done for each page of physical memory (as is > the case in the only caller, the VT-d routine that maps memory for dom0). But > it also appears that we can't convert the phys addr arguments into their virt > addrs to compare with the contiguous frametable range because they will > convert to the DIRECTMAP va's instead. The frametable is allocated in aligned 2MB chunks. So you can check at that granularity rather than 4kB. -- Keir