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

Re: [Xen-devel] [PATCH 2/2] x86: add pte_set_flags/clear_flags forptefl

To: "Jeremy Fitzhardinge" <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2/2] x86: add pte_set_flags/clear_flags forpteflag manipulation
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Mon, 26 Jan 2009 07:51:24 +0000
Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>
Delivery-date: Sun, 25 Jan 2009 23:51:25 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <497A3117.2070809@xxxxxxxx>
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>
References: <4978F216.5040803@xxxxxxxx> <49798A5E.76E4.0078.0@xxxxxxxxxx> <497A3117.2070809@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Jeremy Fitzhardinge <jeremy@xxxxxxxx> 23.01.09 22:05 >>>
>Jan Beulich wrote:
>> I think a comment (or event a BUG_ON()) should be added here to make
>> clear that this absolutely must not be used to toggle the present bit. I
>> even view toggling _PAGE_PSE as dangerous this way.
>>
>> And alternative would be to make these macros and #undef them (or keep
>> them inline functions but add destructive #define-s) after all their users.
>>   
>
>I don't see any particular problem with changing PSE or even Present 
>with these functions; they don't operate on live in-memory ptes, so its 
>not like they could ever be used to modify a pte unless followed with 
>some kind of set_pte operation.  It is unwise to change any pte flag 
>without knowing what you're doing (though P or PSE would probably have 
>less subtle effects than some of the others).

Whether a pte is live doesn't matter here: If you change P on Xen, the
frame number representation *must* change from/to PFN to/from MFN.
In no case (other than iomem pages) is it allowed to flip just this bit.

Jan


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