diff options
author | 2018-04-24 15:32:28 +0000 | |
---|---|---|
committer | 2018-04-24 15:32:28 +0000 | |
commit | d53ed8c64d7dc6ce6e928641b97f81129bb165f7 (patch) | |
tree | 74f711ab846c8668e11412b414b1e2fa8cf306f5 | |
parent | oops, copy-and-pasto in previous sync. fix (diff) | |
download | wireguard-openbsd-d53ed8c64d7dc6ce6e928641b97f81129bb165f7.tar.xz wireguard-openbsd-d53ed8c64d7dc6ce6e928641b97f81129bb165f7.zip |
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.c | 4 |
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); |