From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [Fedora-xen] 2.6.31-1.2.65.xendom0.fc12.x86_64 crash on boot Date: Tue, 15 Sep 2009 15:23:14 -0700 Message-ID: <4AB013D2.908@goop.org> References: <976E8557-F11D-416E-84C2-CD12B180CA1B@rit.edu> <20090915071730.GP31123@reaktio.net> <20090915075613.GQ31123@reaktio.net> <82B3AFF8-B4F1-4347-82F3-04F100002684@rit.edu> <20090915113914.GT31123@reaktio.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20090915113914.GT31123@reaktio.net> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: =?ISO-8859-1?Q?Pasi_K=E4rkk=E4inen?= Cc: Charles Gruener , xen-devel@lists.xensource.com, fedora-xen@redhat.com List-Id: xen-devel@lists.xenproject.org On 09/15/09 04:39, Pasi K=E4rkk=E4inen wrote: > On Tue, Sep 15, 2009 at 07:29:52AM -0400, Charles Gruener wrote: > =20 >> Thanks for the help on configuring my boot options. I apologize that = =20 >> I forgot to mention I'm using the latest kernel from M. Young, =20 >> 2.6.31-1.2.65.xendom0.fc12.x86_64. Here's what I get now that I've =20 >> done all of what you've said: >> >> =20 > Ok. I've CCd Jeremy and xen-devel.=20 > > Does this crash look familiar to you Jeremy?=20 > =20 Does this fix it? >>From 76ca2d74040210450a670df773d760867f07d519 Mon Sep 17 00:00:00 2001 From: Jeremy Fitzhardinge Date: Tue, 15 Sep 2009 14:18:12 -0700 Subject: [PATCH] xen: check EFER for NX before setting up GDT mapping x86-64 assumes NX is available by default, so we need to explicitly check for it before using NX. Some first-generation Intel x86-64 processors didn't support NX, and even recent systems allow it to be disabled in BIOS. Signed-off-by: Jeremy Fitzhardinge diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile index 72bb3a2..0088329 100644 --- a/arch/x86/mm/Makefile +++ b/arch/x86/mm/Makefile @@ -4,6 +4,7 @@ obj-y :=3D init.o init_$(BITS).o fault.o ioremap.o extab= le.o pageattr.o mmap.o \ # Make sure __phys_addr has no stackprotector nostackp :=3D $(call cc-option, -fno-stack-protector) CFLAGS_ioremap.o :=3D $(nostackp) +CFLAGS_init.o :=3D $(nostackp) =20 obj-$(CONFIG_SMP) +=3D tlb.o =20 diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 03644f9..5b55c92 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -1092,6 +1092,11 @@ asmlinkage void __init xen_start_kernel(void) =20 __supported_pte_mask |=3D _PAGE_IOMAP; =20 +#ifdef CONFIG_X86_64 + /* Work out if we support NX */ + check_efer(); +#endif + xen_setup_features(); =20 /* Get mfn list */ @@ -1132,11 +1137,6 @@ asmlinkage void __init xen_start_kernel(void) =20 pgd =3D (pgd_t *)xen_start_info->pt_base; =20 -#ifdef CONFIG_X86_64 - /* Work out if we support NX */ - check_efer(); -#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) =3D &HYPERVISOR_shared_info->vcpu_info[0];