Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
#define FEATURESET_7c0 cpufeat_word(X86_FEATURE_PREFETCHWT1)
#define FEATURESET_e7d cpufeat_word(X86_FEATURE_ITSC)
#define FEATURESET_e8b cpufeat_word(X86_FEATURE_CLZERO)
#define FEATURESET_7c0 cpufeat_word(X86_FEATURE_PREFETCHWT1)
#define FEATURESET_e7d cpufeat_word(X86_FEATURE_ITSC)
#define FEATURESET_e8b cpufeat_word(X86_FEATURE_CLZERO)
+#define FEATURESET_7d0 cpufeat_word(X86_FEATURE_RTM_ALWAYS_ABORT)
-#define FSCAPINTS (FEATURESET_e8b + 1)
+#define FSCAPINTS (FEATURESET_7d0 + 1)
extern uint32_t x86_features[FSCAPINTS];
extern uint32_t x86_features[FSCAPINTS];
#define cpu_has_umip cpu_has(X86_FEATURE_UMIP)
#define cpu_has_pku cpu_has(X86_FEATURE_PKU)
#define cpu_has_umip cpu_has(X86_FEATURE_UMIP)
#define cpu_has_pku cpu_has(X86_FEATURE_PKU)
+#define cpu_has_rtm_always_abort cpu_has(X86_FEATURE_RTM_ALWAYS_ABORT)
+
#endif /* XTF_X86_CPUID_H */
/*
#endif /* XTF_X86_CPUID_H */
/*
cpuid_fn(7, 0, &tmp,
&x86_features[FEATURESET_7b0],
&x86_features[FEATURESET_7c0],
cpuid_fn(7, 0, &tmp,
&x86_features[FEATURESET_7b0],
&x86_features[FEATURESET_7c0],
+ &x86_features[FEATURESET_7d0]);
if ( max_leaf >= 0xd )
cpuid_fn(0xd, 0,
&x86_features[FEATURESET_Da1],
if ( max_leaf >= 0xd )
cpuid_fn(0xd, 0,
&x86_features[FEATURESET_Da1],
/* AMD-defined CPU features, CPUID level 0x80000008.ebx, word 8 */
#define X86_FEATURE_CLZERO (8*32+ 0) /* CLZERO instruction */
/* AMD-defined CPU features, CPUID level 0x80000008.ebx, word 8 */
#define X86_FEATURE_CLZERO (8*32+ 0) /* CLZERO instruction */
+/* Intel-defined CPU features, CPUID level 0x00000007:0.edx, word 9 */
+#define X86_FEATURE_RTM_ALWAYS_ABORT (9*32+11) /* RTM disabled (XBEGIN aborts) */
+
#endif /* XEN_PUBLIC_ARCH_X86_CPUFEATURESET_H */
/*
#endif /* XEN_PUBLIC_ARCH_X86_CPUFEATURESET_H */
/*
- printk("CPUID: HLE %u, RTM %u\n",
- cpu_has_hle, cpu_has_rtm);
+ printk("CPUID: HLE %u, RTM %u, RTM_ALWAYS_ABORT %u\n",
+ cpu_has_hle, cpu_has_rtm, cpu_has_rtm_always_abort);
for ( int i = 0; i < 1000; ++i )
{
for ( int i = 0; i < 1000; ++i )
{