x86/cpu: Print VMX flags in /proc/cpuinfo using VMX_FEATURES_*
[sfrench/cifs-2.6.git] / arch / x86 / kernel / cpu / proc.c
index cb2e49810d687fe67ae304edcb480469b95480b7..4eec8889b0ff1de48787fd162985bf930b89fd11 100644 (file)
@@ -7,6 +7,10 @@
 
 #include "cpu.h"
 
+#ifdef CONFIG_X86_VMX_FEATURE_NAMES
+extern const char * const x86_vmx_flags[NVMXINTS*32];
+#endif
+
 /*
  *     Get CPU information for use by the procfs.
  */
@@ -102,6 +106,17 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                if (cpu_has(c, i) && x86_cap_flags[i] != NULL)
                        seq_printf(m, " %s", x86_cap_flags[i]);
 
+#ifdef CONFIG_X86_VMX_FEATURE_NAMES
+       if (cpu_has(c, X86_FEATURE_VMX) && c->vmx_capability[0]) {
+               seq_puts(m, "\nvmx flags\t:");
+               for (i = 0; i < 32*NVMXINTS; i++) {
+                       if (test_bit(i, (unsigned long *)c->vmx_capability) &&
+                           x86_vmx_flags[i] != NULL)
+                               seq_printf(m, " %s", x86_vmx_flags[i]);
+               }
+       }
+#endif
+
        seq_puts(m, "\nbugs\t\t:");
        for (i = 0; i < 32*NBUGINTS; i++) {
                unsigned int bug_bit = 32*NCAPINTS + i;