summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2018-04-24 15:32:29 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2018-04-24 15:32:29 +0000
commit6c06375dd84ae705761d3028fc7ccc6d3e02f786 (patch)
treeb85a0f5610d5cd8850a055b22d4ec1655e1b5a90
parent1bbe59e8c48eaefe50db108a9ec2a062de03f325 (diff)
make the check for XSAVE the same as it is later in the file, for
consistency. ok guenther note - there is no equivalent diff here for i386 since XSAVE is not used there.
-rw-r--r--sys/arch/amd64/amd64/cpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c
index 1f8dc370a30..bd5f24bf488 100644
--- a/sys/arch/amd64/amd64/cpu.c
+++ b/sys/arch/amd64/amd64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.115 2018/04/20 07:27:54 mlarkin Exp $ */
+/* $OpenBSD: cpu.c,v 1.116 2018/04/24 15:32:28 mlarkin Exp $ */
/* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
@@ -522,7 +522,7 @@ cpu_init(struct cpu_info *ci)
cr4 |= CR4_SMAP;
if (ci->ci_feature_sefflags_ecx & SEFF0ECX_UMIP)
cr4 |= CR4_UMIP;
- if (cpu_ecxfeature & CPUIDECX_XSAVE)
+ if ((cpu_ecxfeature & CPUIDECX_XSAVE) && cpuid_level >= 0xd)
cr4 |= CR4_OSXSAVE;
lcr4(cr4);