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] CONFIG_XEN_COMPAT_030002 broken?

To: Gerd Hoffmann <kraxel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] CONFIG_XEN_COMPAT_030002 broken?
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: Tue, 14 Nov 2006 15:25:45 +0000
Cc: Xen devel list <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Delivery-date: Tue, 14 Nov 2006 07:26:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4559DCA1.6030102@xxxxxxx>
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: AccIASdCZZsotXP0Eduw5QAX8io7RQ==
Thread-topic: [Xen-devel] CONFIG_XEN_COMPAT_030002 broken?
User-agent: Microsoft-Entourage/11.2.5.060620
On 14/11/06 15:11, "Gerd Hoffmann" <kraxel@xxxxxxx> wrote:

>> not nice for use in (early) feature detection. Maybe it'd be better to try
>> and write
>> a page table entry without PAGE_USER, and check whether that bit got turned
>> on implicitly...
> 
> Patch attached, seems to work ok, survived quick test with ttylinux on
> both 3.0.3 and 3.0.2 without crashing and detected both versions correctly.
> 
> cheers,
>   Gerd

Kernel_pages_need_user_flag seems unnecessary. The one consumer of that flag
could simply do 'flags |= kernel_page_user' unconditionally.

Also, is it necessary to default to 3.0.2 behaviour? Could we have
kernel_page_user==0 initially and then change the value only if 3.0.2 is
detected? This would provide a sanity check that check_page_user_flag() is
being executed early enough. We could even set kernel_page_user to a garbage
value initially, like ~0.

So far we have maintained the COMPAT code to be easily entirely strippable.
So the change to pmd_bad() should either use kernel_page_user rather than
_PAGE_USER, or its definition should be conditional on the COMPAT flag.

 -- Keir


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