summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2018-03-13 05:10:41 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2018-03-13 05:10:41 +0000
commiteff3ec5f17b83e30220790cf58d96f9cdc664246 (patch)
treeffd008ef5778cbc8c7071358140724e6db645bc8 /sys/arch/amd64
parentaa6e0fdffa87fe91cde00764cf5a7adc919c10b8 (diff)
We don't save+restore FS.base and GS.base on every context switch but
rather reset GS.base and restore FS.base to what was set via __tcb_set(), so we can't really support the wr{fs,gs}base instructions by userspace. Enabling CR4_FSGSBASE is therefore incorrect so stop doing so. ok jsg@ krw@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/cpu.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c
index 7e14b3709de..00f8b8bd79e 100644
--- a/sys/arch/amd64/amd64/cpu.c
+++ b/sys/arch/amd64/amd64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.112 2018/02/21 19:24:15 guenther Exp $ */
+/* $OpenBSD: cpu.c,v 1.113 2018/03/13 05:10:40 guenther Exp $ */
/* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
@@ -520,8 +520,6 @@ cpu_init(struct cpu_info *ci)
cr4 |= CR4_SMEP;
if (ci->ci_feature_sefflags_ebx & SEFF0EBX_SMAP)
cr4 |= CR4_SMAP;
- if (ci->ci_feature_sefflags_ebx & SEFF0EBX_FSGSBASE)
- cr4 |= CR4_FSGSBASE;
if (ci->ci_feature_sefflags_ecx & SEFF0ECX_UMIP)
cr4 |= CR4_UMIP;
if (cpu_ecxfeature & CPUIDECX_XSAVE)