Skip to contentSkip to conversation

x86/tools: Expose SMAP to HVM guests

PATCH Superseded Feng Wu 1 participant 1 message May 6, 2014

v5 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Feng Wu

author
#0 lore raw

PATCH v5 10/10 x86/tools: Expose SMAP to HVM guests

This patch exposes SMAP festure to HVM guests

---
 tools/libxc/xc_cpufeature.h | 1 +
 tools/libxc/xc_cpuid_x86.c  | 1 +
 2 files changed, 2 insertions(+)
tools/libxc/xc_cpufeature.h +1 -0
index 6fce03b..66cc82e 100644
@@ -140,6 +140,7 @@
 #define X86_FEATURE_RTM         11 /* Restricted Transactional Memory */
 #define X86_FEATURE_RDSEED      18 /* RDSEED instruction */
 #define X86_FEATURE_ADX         19 /* ADCX, ADOX instructions */
+#define X86_FEATURE_SMAP        20 /* Supervisor Mode Access Protection */
 
 
 #endif /* __LIBXC_CPUFEATURE_H */
tools/libxc/xc_cpuid_x86.c +1 -0
index 71917e3..79490da 100644
@@ -375,6 +375,7 @@ static void xc_cpuid_hvm_policy(
                         bitmaskof(X86_FEATURE_RTM)  |
                         bitmaskof(X86_FEATURE_RDSEED)  |
                         bitmaskof(X86_FEATURE_ADX)  |
+                        bitmaskof(X86_FEATURE_SMAP) |
                         bitmaskof(X86_FEATURE_FSGSBASE));
         } else
             regs[1] = 0;
Signature · 1 line
1.8.3.1