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] 2.6.28 64-bit domU not booting

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: Re: [Xen-devel] 2.6.28 64-bit domU not booting
From: Chris Lalancette <clalance@xxxxxxxxxx>
Date: Mon, 30 Mar 2009 11:19:32 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Valtteri Kiviniemi <valtteri.kiviniemi@xxxxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Delivery-date: Mon, 30 Mar 2009 02:23:08 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <49CD1C29.9060103@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: <4961FABF.1020304@xxxxxxxxxxxx> <49CCAC82.2010204@xxxxxxxxxx> <49CD1C29.9060103@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.21 (X11/20090320)
Jeremy Fitzhardinge wrote:
> Chris Lalancette wrote:
>> Just to dig up this old thread: we've been seeing the same thing.  I *think* 
>> it
>> comes down to the NX bit (or the lack thereof); on machines without NX, the
>> early pagetable setup is trying to use the NX bit in the PTE flags, and the
>> hypervisor is telling it to go away.  The Red Hat bugzilla entry that I've 
>> filed
>> has more analysis:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=492523
>>
>> Valtteri, can you give the output of "cat /proc/cpuinfo | grep flags", so we 
>> can
>> confirm that it's probably the same issue?
>>
>> And it looks like Ian Campbell actually posted a patch upstream
>> (http://lkml.indiana.edu/hypermail/linux/kernel/0901.3/02668.html) that 
>> should
>> fix this, but I don't see it in any of the upstream trees.  Ian, Jeremy, do 
>> you
>> guys know what the status is there?  It would be good to get into 2.6.30, and
>> probably backport to the stable trees as well.
>>   
> 
> Hm, yes, it does seem to have got lost.  But I wonder if a simpler fix 
> isn't just test for NX early and set __supported_pte_mask accordingly.  
> Does this work?
> 
>     J
> 
> From: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
> Date: Fri, 27 Mar 2009 11:29:02 -0700
> Subject: [PATCH] xen: set _PAGE_NX in __supported_pte_mask before pagetable 
> construction
> 
> Many 32-bit and some 64-bit machines don't support the NX flag in ptes.
> Check for NX before constructing the kernel pagetables.
> 
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
> 
> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
> index 992be7f..f8c9e49 100644
> --- a/arch/x86/xen/enlighten.c
> +++ b/arch/x86/xen/enlighten.c
> @@ -42,6 +42,7 @@
>  #include <asm/xen/hypervisor.h>
>  #include <asm/fixmap.h>
>  #include <asm/processor.h>
> +#include <asm/proto.h>
>  #include <asm/msr-index.h>
>  #include <asm/setup.h>
>  #include <asm/desc.h>
> @@ -1003,6 +1004,13 @@ asmlinkage void __init xen_start_kernel(void)
>  
>       __supported_pte_mask |= _PAGE_IOMAP;
>  
> +     /* Work out if we support NX */
> +#ifdef CONFIG_X86_64
> +     check_efer();
> +#else
> +     set_nx();
> +#endif
> +
>       /* Don't do the full vcpu_info placement stuff until we have a
>          possible map and a non-dummy shared_info. */
>       per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];

Yep, much happier this way (although I only tested out x86_64, not i386).

Tested-by: Chris Lalancette <clalance@xxxxxxxxxx>

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

<Prev in Thread] Current Thread [Next in Thread>