diff options
author | kib <kib@FreeBSD.org> | 2017-09-11 08:48:36 +0000 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2018-02-19 14:31:40 -0300 |
commit | 2589da26b930eaf9441b6bf27c0f410062adf507 (patch) | |
tree | f814d1d2fffd5b06bf6cc8ee0a35de86abc861ab /sys/x86 | |
parent | e4ceef150ec3bdd258987bf82d56662293bb1ace (diff) | |
download | FreeBSD-src-2589da26b930eaf9441b6bf27c0f410062adf507.zip FreeBSD-src-2589da26b930eaf9441b6bf27c0f410062adf507.tar.gz |
MFC r322762, r322799, r322832, r322833:
Make WRFSBASE and WRGSBASE instructions functional.
(cherry picked from commit b1a7a7418e73251aad628dc4f9418e550a9fd3d7)
Diffstat (limited to 'sys/x86')
-rw-r--r-- | sys/x86/x86/identcpu.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sys/x86/x86/identcpu.c b/sys/x86/x86/identcpu.c index 22f3966..257edad7 100644 --- a/sys/x86/x86/identcpu.c +++ b/sys/x86/x86/identcpu.c @@ -1421,18 +1421,15 @@ identify_cpu(void) cpu_stdext_feature = regs[1]; /* - * Some hypervisors fail to filter out unsupported - * extended features. For now, disable the + * Some hypervisors failed to filter out unsupported + * extended features. Allow to disable the * extensions, activation of which requires setting a * bit in CR4, and which VM monitors do not support. */ - if (cpu_feature2 & CPUID2_HV) { - cpu_stdext_disable = CPUID_STDEXT_FSGSBASE | - CPUID_STDEXT_SMEP; - } else - cpu_stdext_disable = 0; + cpu_stdext_disable = 0; TUNABLE_INT_FETCH("hw.cpu_stdext_disable", &cpu_stdext_disable); cpu_stdext_feature &= ~cpu_stdext_disable; + cpu_stdext_feature2 = regs[2]; } |