summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMukesh Rathor <mukesh.rathor@oracle.com>2014-01-30 00:15:18 (GMT)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2014-02-03 20:44:18 (GMT)
commitafca50132cfa7bfc5646676d8c67dc18454f38f8 (patch)
tree312daa25104997e9157844405ac33b1d027f138d /arch
parente85fc9805591a17ca8af50023ee8e2b61d9a123b (diff)
downloadlinux-afca50132cfa7bfc5646676d8c67dc18454f38f8.tar.xz
xen/pvh: set CR4 flags for APs
During bootup in the 'probe_page_size_mask' these CR4 flags are set in there. But for AP processors they are not set as we do not use 'secondary_startup_64' which the baremetal kernels uses. Instead do it in this function which we use in Xen PVH during our startup for AP processors. As such fix it up to make sure we have that flag set. Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/xen/enlighten.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index a4d7b64..201d09a 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1473,6 +1473,18 @@ static void xen_pvh_set_cr_flags(int cpu)
* X86_CR0_TS, X86_CR0_PE, X86_CR0_ET are set by Xen for HVM guests
* (which PVH shared codepaths), while X86_CR0_PG is for PVH. */
write_cr0(read_cr0() | X86_CR0_MP | X86_CR0_NE | X86_CR0_WP | X86_CR0_AM);
+
+ if (!cpu)
+ return;
+ /*
+ * For BSP, PSE PGE are set in probe_page_size_mask(), for APs
+ * set them here. For all, OSFXSR OSXMMEXCPT are set in fpu_init.
+ */
+ if (cpu_has_pse)
+ set_in_cr4(X86_CR4_PSE);
+
+ if (cpu_has_pge)
+ set_in_cr4(X86_CR4_PGE);
}
/*