All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Lalancette <clalance@redhat.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: xen-devel@lists.xensource.com,
	Valtteri Kiviniemi <valtteri.kiviniemi@dataproof.fi>,
	Ian Campbell <Ian.Campbell@citrix.com>
Subject: Re: 2.6.28 64-bit domU not booting
Date: Mon, 30 Mar 2009 11:19:32 +0200	[thread overview]
Message-ID: <49D08EA4.3010600@redhat.com> (raw)
In-Reply-To: <49CD1C29.9060103@goop.org>

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@citrix.com>
> 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@citrix.com>
> 
> 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@redhat.com>

      reply	other threads:[~2009-03-30  9:19 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-05 12:19 2.6.28 64-bit domU not booting Valtteri Kiviniemi
2009-01-05 12:48 ` Valtteri Kiviniemi
2009-01-06 14:50   ` Pasi Kärkkäinen
2009-01-05 14:24 ` Ian Campbell
2009-01-05 18:11   ` Valtteri Kiviniemi
2009-01-06  9:54     ` Ian Campbell
2009-01-06 14:37       ` Valtteri Kiviniemi
2009-01-06 14:56         ` Ian Campbell
2009-01-06 14:59           ` Valtteri Kiviniemi
2009-01-07 13:28             ` Valtteri Kiviniemi
2009-01-07 13:33               ` Ian Campbell
2009-01-07 13:39                 ` Valtteri Kiviniemi
2009-01-07 14:25                   ` Valtteri Kiviniemi
2009-01-07 15:25                     ` Pasi Kärkkäinen
2009-01-07 16:19                       ` Valtteri Kiviniemi
2009-01-07 16:23                         ` Pasi Kärkkäinen
2009-01-07 16:25                           ` Valtteri Kiviniemi
2009-01-07 17:15                             ` Pasi Kärkkäinen
2009-01-07 18:06                               ` Valtteri Kiviniemi
2009-01-07 18:17                                 ` Pasi Kärkkäinen
2009-01-07 18:20                                   ` Valtteri Kiviniemi
2009-01-07 19:26                                     ` Pasi Kärkkäinen
2009-01-07 19:34                                       ` Valtteri Kiviniemi
2009-01-07 19:38                                         ` Pasi Kärkkäinen
2009-01-07 19:42                                           ` Valtteri Kiviniemi
2009-01-07 19:47                                             ` Pasi Kärkkäinen
2009-01-07 19:51                                               ` Valtteri Kiviniemi
2009-01-11  0:39                                                 ` Valtteri Kiviniemi
2009-01-16 19:16                                                   ` Jeremy Fitzhardinge
2009-01-18 18:11                                                     ` Valtteri Kiviniemi
2009-01-20 19:16                                                       ` Jeremy Fitzhardinge
2009-01-20 21:39                                                         ` Valtteri Kiviniemi
2009-02-01 15:13                                     ` dbaxps
2009-03-27 10:37 ` Chris Lalancette
2009-03-27 18:34   ` Jeremy Fitzhardinge
2009-03-30  9:19     ` Chris Lalancette [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49D08EA4.3010600@redhat.com \
    --to=clalance@redhat.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=jeremy@goop.org \
    --cc=valtteri.kiviniemi@dataproof.fi \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.