x86: expose RDSEED, ADX, and PREFETCHW to dom0
authorXudong Hao <xudong.hao@intel.com>
Mon, 24 Feb 2014 11:11:53 +0000 (12:11 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 24 Feb 2014 11:11:53 +0000 (12:11 +0100)
This patch explicitly exposes Intel new features to dom0, including
RDSEED and ADX. As for PREFETCHW, it doesn't need explicit exposing.

Signed-off-by: Xudong Hao <xudong.hao@intel.com>
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/traps.c
xen/include/asm-x86/cpufeature.h

index 0bd43b9b1162e1565b71b5764ea6fb52f03c2685..c736dd129874d3603a00646646af8e1bf5937f56 100644 (file)
@@ -829,6 +829,8 @@ void pv_cpuid(struct cpu_user_regs *regs)
                   cpufeat_mask(X86_FEATURE_BMI2) |
                   cpufeat_mask(X86_FEATURE_ERMS) |
                   cpufeat_mask(X86_FEATURE_RTM)  |
+                  cpufeat_mask(X86_FEATURE_RDSEED)  |
+                  cpufeat_mask(X86_FEATURE_ADX)  |
                   cpufeat_mask(X86_FEATURE_FSGSBASE));
         else
             b = 0;
index 1cfaf948b2c18d7cadc005b718003972a3013fef..87d5f66c15e447f9add4cd85d82fe6882eb050e8 100644 (file)
 #define X86_FEATURE_INVPCID    (7*32+10) /* Invalidate Process Context ID */
 #define X86_FEATURE_RTM        (7*32+11) /* Restricted Transactional Memory */
 #define X86_FEATURE_NO_FPU_SEL         (7*32+13) /* FPU CS/DS stored as zero */
+#define X86_FEATURE_RDSEED     (7*32+18) /* RDSEED instruction */
+#define X86_FEATURE_ADX                (7*32+19) /* ADCX, ADOX instructions */
 #define X86_FEATURE_SMAP       (7*32+20) /* Supervisor Mode Access Prevention */
 
 #define cpu_has(c, bit)                test_bit(bit, (c)->x86_capability)