Re: [Xen-devel] 2.6.28 64-bit domU not booting
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:
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?
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
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
@@ -42,6 +42,7 @@
@@ -1003,6 +1004,13 @@ asmlinkage void __init xen_start_kernel(void)
__supported_pte_mask |= _PAGE_IOMAP;
+ /* Work out if we support NX */
/* 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;
Xen-devel mailing list