aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/xen
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-03-27 14:29:02 -0400
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>2009-04-08 17:25:49 -0400
commitbc6081ff98eec627919e0c68415e46a78fe51dc4 (patch)
treec9003ee3aa800c5437b9d2e71ad998991bc0b95e /arch/x86/xen
parent9a5a2cac9f99c98d9d15cec17b1904f29d0e8009 (diff)
xen: set _PAGE_NX in __supported_pte_mask before pagetable construction
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>
Diffstat (limited to 'arch/x86/xen')
-rw-r--r--arch/x86/xen/enlighten.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 69de19168a7..f7d0fd7ff8e 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -42,6 +42,7 @@
42#include <asm/xen/hypervisor.h> 42#include <asm/xen/hypervisor.h>
43#include <asm/fixmap.h> 43#include <asm/fixmap.h>
44#include <asm/processor.h> 44#include <asm/processor.h>
45#include <asm/proto.h>
45#include <asm/msr-index.h> 46#include <asm/msr-index.h>
46#include <asm/setup.h> 47#include <asm/setup.h>
47#include <asm/desc.h> 48#include <asm/desc.h>
@@ -914,7 +915,6 @@ static const struct machine_ops __initdata xen_machine_ops = {
914 .emergency_restart = xen_emergency_restart, 915 .emergency_restart = xen_emergency_restart,
915}; 916};
916 917
917
918/* First C function to be called on Xen boot */ 918/* First C function to be called on Xen boot */
919asmlinkage void __init xen_start_kernel(void) 919asmlinkage void __init xen_start_kernel(void)
920{ 920{
@@ -982,6 +982,11 @@ asmlinkage void __init xen_start_kernel(void)
982 if (!xen_initial_domain()) 982 if (!xen_initial_domain())
983 __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD); 983 __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
984 984
985#ifdef CONFIG_X86_64
986 /* Work out if we support NX */
987 check_efer();
988#endif
989
985 /* Don't do the full vcpu_info placement stuff until we have a 990 /* Don't do the full vcpu_info placement stuff until we have a
986 possible map and a non-dummy shared_info. */ 991 possible map and a non-dummy shared_info. */
987 per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; 992 per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];