WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: invalid PTE for xen_start-info ?

To: Rik van Riel <riel@xxxxxxxxxx>
Subject: [Xen-devel] Re: invalid PTE for xen_start-info ?
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Wed, 04 Oct 2006 15:16:54 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 04 Oct 2006 07:16:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4523BB63.5000005@xxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acbnv74O/HZ2BVOyEduRUwAX8io7RQ==
Thread-topic: invalid PTE for xen_start-info ?
User-agent: Microsoft-Entourage/11.2.5.060620


On 4/10/06 14:47, "Rik van Riel" <riel@xxxxxxxxxx> wrote:

>> It's not a bug -- it's one of the available-for-software flags that is
>> stolen by Xen to indicate a kernel PTE. This is done so that we can
>> distinguish kernel and user mappings, so that the latter can have the global
>> bit set. Sounds weird, but it avoids flushing user mappings from the TLB
>> when executing syscalls (we have to change %cr3 value when switching between
>> guest-user and guest-kernel modes).
> 
> OK, so pte_val() just needs to know about these software flags
> and mask them out before passing the value to mfn_to_pfn ?

You should use pte_pfn(), or pte_mfn(), or (pte_val() & PHYSICAL_PAGE_MASK)
for isolating the address part of a pte. If there is *any* Linux code that
is accessing addresses from pte contents via other methods then please do
let us know! But I suspect this won't be the case, due to the existing need
to mask off PAGE_NX.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel