[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86/tools: expose SMAP to HVM guests



commit 953282a09985592177c418d40060d0f90dba526d
Author:     Feng Wu <feng.wu@xxxxxxxxx>
AuthorDate: Mon May 12 17:05:33 2014 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon May 12 17:05:33 2014 +0200

    x86/tools: expose SMAP to HVM guests
    
    This patch exposes SMAP festure to HVM guests
    
    Signed-off-by: Feng Wu <feng.wu@xxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 tools/libxc/xc_cpufeature.h |    1 +
 tools/libxc/xc_cpuid_x86.c  |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/libxc/xc_cpufeature.h b/tools/libxc/xc_cpufeature.h
index 6fce03b..66cc82e 100644
--- a/tools/libxc/xc_cpufeature.h
+++ b/tools/libxc/xc_cpufeature.h
@@ -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 */
diff --git a/tools/libxc/xc_cpuid_x86.c b/tools/libxc/xc_cpuid_x86.c
index 6a02bf0..4772ca7 100644
--- a/tools/libxc/xc_cpuid_x86.c
+++ b/tools/libxc/xc_cpuid_x86.c
@@ -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;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.