rpms/kernel/F-12 linux-2.6-xen-check-efer-fix.patch, NONE, 1.1 kernel.spec, 1.1832, 1.1833
Justin M. Forbes
jforbes at fedoraproject.org
Fri Sep 25 15:23:32 UTC 2009
Author: jforbes
Update of /cvs/pkgs/rpms/kernel/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18048
Modified Files:
kernel.spec
Added Files:
linux-2.6-xen-check-efer-fix.patch
Log Message:
Fix xen guest booting when NX is disabled (#525290)
linux-2.6-xen-check-efer-fix.patch:
mm/Makefile | 1 +
xen/enlighten.c | 10 +++++-----
2 files changed, 6 insertions(+), 5 deletions(-)
--- NEW FILE linux-2.6-xen-check-efer-fix.patch ---
>From b75fe4e5b869f8dbebd36df64a7fcda0c5b318ed Mon Sep 17 00:00:00 2001
From: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Date: Mon, 21 Sep 2009 13:34:06 -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.
[ Impact: prevent Xen crash on NX-less 64-bit machines ]
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge at citrix.com>
Cc: Stable Kernel <stable at kernel.org>
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile
index 9b5a9f5..dd313d0 100644
--- a/arch/x86/mm/Makefile
+++ b/arch/x86/mm/Makefile
@@ -4,6 +4,7 @@ obj-y := init.o init_$(BITS).o fault.o ioremap.o extable.o pageattr.o mmap.o \
# Make sure __phys_addr has no stackprotector
nostackp := $(call cc-option, -fno-stack-protector)
CFLAGS_ioremap.o := $(nostackp)
+CFLAGS_init.o := $(nostackp)
obj-$(CONFIG_SMP) += tlb.o
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 0dd0c2c..5d701bf 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1083,6 +1083,11 @@ asmlinkage void __init xen_start_kernel(void)
__supported_pte_mask |= _PAGE_IOMAP;
+#ifdef CONFIG_X86_64
+ /* Work out if we support NX */
+ check_efer();
+#endif
+
xen_setup_features();
/* Get mfn list */
@@ -1123,11 +1128,6 @@ asmlinkage void __init xen_start_kernel(void)
pgd = (pgd_t *)xen_start_info->pt_base;
-#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) = &HYPERVISOR_shared_info->vcpu_info[0];
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1832
retrieving revision 1.1833
diff -u -p -r1.1832 -r1.1833
--- kernel.spec 25 Sep 2009 07:13:51 -0000 1.1832
+++ kernel.spec 25 Sep 2009 15:23:31 -0000 1.1833
@@ -694,6 +694,7 @@ Patch1552: linux-2.6-ksm-updates.patch
Patch1553: linux-2.6-ksm-fix-munlock.patch
Patch1578: linux-2.6-xen-stack-protector-fix.patch
Patch1579: linux-2.6-virtio_blk-revert-QUEUE_FLAG_VIRT-addition.patch
+Patch1580: linux-2.6-xen-check-efer-fix.patch
# nouveau + drm fixes
Patch1812: drm-next-adea4796c.patch
@@ -1354,6 +1355,7 @@ ApplyPatch linux-2.6-ksm-kvm.patch
# Assorted Virt Fixes
ApplyPatch linux-2.6-xen-stack-protector-fix.patch
ApplyPatch linux-2.6-virtio_blk-revert-QUEUE_FLAG_VIRT-addition.patch
+ApplyPatch linux-2.6-xen-check-efer-fix.patch
# Fix block I/O errors in KVM
ApplyPatch linux-2.6-block-silently-error-unsupported-empty-barriers-too.patch
@@ -2059,6 +2061,9 @@ fi
# and build.
%changelog
+* Fri Sep 25 2009 Justin M. Forbes <bskeggs at redhat.com> 2.6.31.1-47
+- Fix xen guest booting when NX is disabled (#525290)
+
* Fri Sep 25 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.1-46
- drm-nouveau.patch: cleanups, fixes, pre-G80 s/r fixes, init rework
More information about the scm-commits
mailing list