From 77e2817e78b7c20d77a94256f5fcb31651001e8f Mon Sep 17 00:00:00 2001 From: Luiz Souza Date: Fri, 23 Feb 2018 19:38:29 -0300 Subject: Revert "Revert "MFC r322762, r322799, r322832, r322833:"" This reverts commit 5919c0a9658dde48bd090704915aa3a85a6c0d26. --- sys/x86/x86/identcpu.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'sys/x86') 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]; } -- cgit v1.1