mov %ecx,%gs
mov %ecx,%ss
- /* Enable full CR4 features. */
- mov mmu_cr4_features(%rip),%rcx
+ /* Enable minimal CR4 features. */
+ mov $XEN_MINIMAL_CR4,%rcx
mov %rcx,%cr4
mov stack_start(%rip),%rsp
struct cpuinfo_x86 __read_mostly boot_cpu_data = { 0, 0, 0, 0, -1 };
-unsigned long __read_mostly mmu_cr4_features =
- X86_CR4_PSE | X86_CR4_PGE | X86_CR4_PAE;
+unsigned long __read_mostly mmu_cr4_features = XEN_MINIMAL_CR4;
bool_t __initdata acpi_disabled;
bool_t __initdata acpi_force;
this_cpu(curr_vcpu) = idle_vcpu[cpu];
if ( cpu_has_efer )
rdmsrl(MSR_EFER, this_cpu(efer));
- asm volatile ( "mov %%cr4,%0" : "=r" (this_cpu(cr4)) );
/*
* Just as during early bootstrap, it is convenient here to disable
/* Full exception support from here on in. */
+ /* Safe to enable feature such as CR4.MCE with the IDT set up now. */
+ write_cr4(mmu_cr4_features);
+
percpu_traps_init();
init_percpu_time();
#define PFEC_page_paged (1U<<5)
#define PFEC_page_shared (1U<<6)
+#define XEN_MINIMAL_CR4 (X86_CR4_PSE | X86_CR4_PGE | X86_CR4_PAE)
+
#define XEN_SYSCALL_MASK (X86_EFLAGS_AC|X86_EFLAGS_VM|X86_EFLAGS_RF| \
X86_EFLAGS_NT|X86_EFLAGS_DF|X86_EFLAGS_IF| \
X86_EFLAGS_TF)