This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [RFC] fix xen_in_range()

To: "Cihula, Joseph" <joseph.cihula@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [RFC] fix xen_in_range()
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Thu, 23 Apr 2009 08:25:26 +0100
Cc: "Cui, Dexuan" <dexuan.cui@xxxxxxxxx>, "Wang, Shane" <shane.wang@xxxxxxxxx>, "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>, "Yang, Xiaowei" <xiaowei.yang@xxxxxxxxx>, "Ke, Liping" <liping.ke@xxxxxxxxx>, "Li, Xin" <xin.li@xxxxxxxxx>
Delivery-date: Thu, 23 Apr 2009 00:25:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4F65016F6CB04E49BFFA15D4F7B798D9988CF1A3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcnDpY3Rx9vYpAhLRJKuPa7HelNYvQAPx4L1
Thread-topic: [RFC] fix xen_in_range()
User-agent: Microsoft-Entourage/
On 23/04/2009 00:53, "Cihula, Joseph" <joseph.cihula@xxxxxxxxx> 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

Xen-devel mailing list