From: Feng Wu Subject: [PATCH v1 6/6] x86/tools: Expose SMAP to HVM guests Date: Tue, 15 Apr 2014 21:02:28 +0800 Message-ID: <1397566948-19836-1-git-send-email-feng.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: JBeulich@suse.com, Ian.Campbell@citrix.com, xen-devel@lists.xen.org Cc: Feng Wu , eddie.dong@intel.com, jun.nakajima@intel.com List-Id: xen-devel@lists.xenproject.org This patch exposes SMAP festure to HVM guests Signed-off-by: Feng Wu --- tools/libxc/xc_cpufeature.h | 1 + tools/libxc/xc_cpuid_x86.c | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/libxc/xc_cpufeature.h b/tools/libxc/xc_cpufeature.h index c464e3a..37c69f7 100644 --- a/tools/libxc/xc_cpufeature.h +++ b/tools/libxc/xc_cpufeature.h @@ -137,5 +137,6 @@ #define X86_FEATURE_ERMS 9 /* Enhanced REP MOVSB/STOSB */ #define X86_FEATURE_INVPCID 10 /* Invalidate Process Context ID */ #define X86_FEATURE_RTM 11 /* Restricted Transactional Memory */ +#define X86_FEATURE_SMAP 20 /* Supervisor Mode Access Protection */ #endif /* __LIBXC_CPUFEATURE_H */ diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c index bbbf9b8..953945f 100644 --- a/tools/libxc/xc_cpuid_x86.c +++ b/tools/libxc/xc_cpuid_x86.c @@ -367,6 +367,7 @@ static void xc_cpuid_hvm_policy( bitmaskof(X86_FEATURE_HLE) | bitmaskof(X86_FEATURE_AVX2) | bitmaskof(X86_FEATURE_SMEP) | + bitmaskof(X86_FEATURE_SMAP) | bitmaskof(X86_FEATURE_BMI2) | bitmaskof(X86_FEATURE_ERMS) | bitmaskof(X86_FEATURE_INVPCID) | -- 1.8.3.1