Skip to content

Commit 4fdec20

Browse files
bonziniIngo Molnar
authored andcommitted
x86/cpufeature: Move processor tracing out of scattered features
Processor tracing is already enumerated in word 9 (CPUID[7,0].EBX), so do not duplicate it in the scattered features word. Besides being more tidy, this will be useful for KVM when it presents processor tracing to the guests. KVM selects host features that are supported by both the host kernel (depending on command line options, CPU errata, or whatever) and KVM. Whenever a full feature word exists, KVM's code is written in the expectation that the CPUID bit number matches the X86_FEATURE_* bit number, but this is not the case for X86_FEATURE_INTEL_PT. Signed-off-by: Paolo Bonzini <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Luwei Kang <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Radim Krčmář <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 385d11b commit 4fdec20

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

arch/x86/include/asm/cpufeatures.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@
206206
#define X86_FEATURE_RETPOLINE ( 7*32+12) /* Generic Retpoline mitigation for Spectre variant 2 */
207207
#define X86_FEATURE_RETPOLINE_AMD ( 7*32+13) /* AMD Retpoline mitigation for Spectre variant 2 */
208208
#define X86_FEATURE_INTEL_PPIN ( 7*32+14) /* Intel Processor Inventory Number */
209-
#define X86_FEATURE_INTEL_PT ( 7*32+15) /* Intel Processor Trace */
210209
#define X86_FEATURE_AVX512_4VNNIW ( 7*32+16) /* AVX-512 Neural Network Instructions */
211210
#define X86_FEATURE_AVX512_4FMAPS ( 7*32+17) /* AVX-512 Multiply Accumulation Single precision */
212211

@@ -246,6 +245,7 @@
246245
#define X86_FEATURE_AVX512IFMA ( 9*32+21) /* AVX-512 Integer Fused Multiply-Add instructions */
247246
#define X86_FEATURE_CLFLUSHOPT ( 9*32+23) /* CLFLUSHOPT instruction */
248247
#define X86_FEATURE_CLWB ( 9*32+24) /* CLWB instruction */
248+
#define X86_FEATURE_INTEL_PT ( 9*32+25) /* Intel Processor Trace */
249249
#define X86_FEATURE_AVX512PF ( 9*32+26) /* AVX-512 Prefetch */
250250
#define X86_FEATURE_AVX512ER ( 9*32+27) /* AVX-512 Exponential and Reciprocal */
251251
#define X86_FEATURE_AVX512CD ( 9*32+28) /* AVX-512 Conflict Detection */

arch/x86/kernel/cpu/scattered.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ struct cpuid_bit {
2121
static const struct cpuid_bit cpuid_bits[] = {
2222
{ X86_FEATURE_APERFMPERF, CPUID_ECX, 0, 0x00000006, 0 },
2323
{ X86_FEATURE_EPB, CPUID_ECX, 3, 0x00000006, 0 },
24-
{ X86_FEATURE_INTEL_PT, CPUID_EBX, 25, 0x00000007, 0 },
2524
{ X86_FEATURE_AVX512_4VNNIW, CPUID_EDX, 2, 0x00000007, 0 },
2625
{ X86_FEATURE_AVX512_4FMAPS, CPUID_EDX, 3, 0x00000007, 0 },
2726
{ X86_FEATURE_CAT_L3, CPUID_EBX, 1, 0x00000010, 0 },

0 commit comments

Comments
 (0)