Skip to content

Commit 4b3f764

Browse files
committed
tools headers cpufeatures: Sync with the kernel sources
To pick the changes from: d6d0c7f ("x86/cpufeatures: Add PerfMonV2 feature bit") 296d5a1 ("KVM: SEV-ES: Use V_TSC_AUX if available instead of RDTSC/MSR_TSC_AUX intercepts") f309033 ("x86/cpufeatures: Add virtual TSC_AUX feature bit") 8ad7e8f ("x86/fpu/xsave: Support XSAVEC in the kernel") 59bd54a ("x86/tdx: Detect running as a TDX guest in early boot") a77d41a ("x86/cpufeatures: Add AMD Fam19h Branch Sampling feature") This only causes these perf files to be rebuilt: CC /tmp/build/perf/bench/mem-memcpy-x86-64-asm.o CC /tmp/build/perf/bench/mem-memset-x86-64-asm.o And addresses this perf build warning: Warning: Kernel ABI header at 'tools/arch/x86/include/asm/cpufeatures.h' differs from latest version at 'arch/x86/include/asm/cpufeatures.h' diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h Warning: Kernel ABI header at 'tools/arch/x86/include/asm/disabled-features.h' differs from latest version at 'arch/x86/include/asm/disabled-features.h' diff -u tools/arch/x86/include/asm/disabled-features.h arch/x86/include/asm/disabled-features.h Cc: Peter Zijlstra <[email protected]> Cc: Sandipan Das <[email protected]> Cc: Babu Moger <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Kuppuswamy Sathyanarayanan <[email protected]> Cc: Stephane Eranian <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: https://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 0fdd435 commit 4b3f764

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

tools/arch/x86/include/asm/cpufeatures.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
#define X86_FEATURE_INVPCID_SINGLE ( 7*32+ 7) /* Effectively INVPCID && CR4.PCIDE=1 */
202202
#define X86_FEATURE_HW_PSTATE ( 7*32+ 8) /* AMD HW-PState */
203203
#define X86_FEATURE_PROC_FEEDBACK ( 7*32+ 9) /* AMD ProcFeedbackInterface */
204-
/* FREE! ( 7*32+10) */
204+
#define X86_FEATURE_XCOMPACTED ( 7*32+10) /* "" Use compacted XSTATE (XSAVES or XSAVEC) */
205205
#define X86_FEATURE_PTI ( 7*32+11) /* Kernel Page Table Isolation enabled */
206206
#define X86_FEATURE_RETPOLINE ( 7*32+12) /* "" Generic Retpoline mitigation for Spectre variant 2 */
207207
#define X86_FEATURE_RETPOLINE_LFENCE ( 7*32+13) /* "" Use LFENCE for Spectre variant 2 */
@@ -211,7 +211,7 @@
211211
#define X86_FEATURE_SSBD ( 7*32+17) /* Speculative Store Bypass Disable */
212212
#define X86_FEATURE_MBA ( 7*32+18) /* Memory Bandwidth Allocation */
213213
#define X86_FEATURE_RSB_CTXSW ( 7*32+19) /* "" Fill RSB on context switches */
214-
/* FREE! ( 7*32+20) */
214+
#define X86_FEATURE_PERFMON_V2 ( 7*32+20) /* AMD Performance Monitoring Version 2 */
215215
#define X86_FEATURE_USE_IBPB ( 7*32+21) /* "" Indirect Branch Prediction Barrier enabled */
216216
#define X86_FEATURE_USE_IBRS_FW ( 7*32+22) /* "" Use IBRS during runtime firmware calls */
217217
#define X86_FEATURE_SPEC_STORE_BYPASS_DISABLE ( 7*32+23) /* "" Disable Speculative Store Bypass. */
@@ -238,6 +238,7 @@
238238
#define X86_FEATURE_VMW_VMMCALL ( 8*32+19) /* "" VMware prefers VMMCALL hypercall instruction */
239239
#define X86_FEATURE_PVUNLOCK ( 8*32+20) /* "" PV unlock function */
240240
#define X86_FEATURE_VCPUPREEMPT ( 8*32+21) /* "" PV vcpu_is_preempted function */
241+
#define X86_FEATURE_TDX_GUEST ( 8*32+22) /* Intel Trust Domain Extensions Guest */
241242

242243
/* Intel-defined CPU features, CPUID level 0x00000007:0 (EBX), word 9 */
243244
#define X86_FEATURE_FSGSBASE ( 9*32+ 0) /* RDFSBASE, WRFSBASE, RDGSBASE, WRGSBASE instructions*/
@@ -315,6 +316,7 @@
315316
#define X86_FEATURE_VIRT_SSBD (13*32+25) /* Virtualized Speculative Store Bypass Disable */
316317
#define X86_FEATURE_AMD_SSB_NO (13*32+26) /* "" Speculative Store Bypass is fixed in hardware. */
317318
#define X86_FEATURE_CPPC (13*32+27) /* Collaborative Processor Performance Control */
319+
#define X86_FEATURE_BRS (13*32+31) /* Branch Sampling available */
318320

319321
/* Thermal and Power Management Leaf, CPUID level 0x00000006 (EAX), word 14 */
320322
#define X86_FEATURE_DTHERM (14*32+ 0) /* Digital Thermal Sensor */
@@ -405,6 +407,7 @@
405407
#define X86_FEATURE_SEV (19*32+ 1) /* AMD Secure Encrypted Virtualization */
406408
#define X86_FEATURE_VM_PAGE_FLUSH (19*32+ 2) /* "" VM Page Flush MSR is supported */
407409
#define X86_FEATURE_SEV_ES (19*32+ 3) /* AMD Secure Encrypted Virtualization - Encrypted State */
410+
#define X86_FEATURE_V_TSC_AUX (19*32+ 9) /* "" Virtual TSC_AUX */
408411
#define X86_FEATURE_SME_COHERENT (19*32+10) /* "" AMD hardware-enforced cache coherency */
409412

410413
/*

tools/arch/x86/include/asm/disabled-features.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@
6262
# define DISABLE_SGX (1 << (X86_FEATURE_SGX & 31))
6363
#endif
6464

65+
#ifdef CONFIG_INTEL_TDX_GUEST
66+
# define DISABLE_TDX_GUEST 0
67+
#else
68+
# define DISABLE_TDX_GUEST (1 << (X86_FEATURE_TDX_GUEST & 31))
69+
#endif
70+
6571
/*
6672
* Make sure to add features to the correct mask
6773
*/
@@ -73,7 +79,7 @@
7379
#define DISABLED_MASK5 0
7480
#define DISABLED_MASK6 0
7581
#define DISABLED_MASK7 (DISABLE_PTI)
76-
#define DISABLED_MASK8 0
82+
#define DISABLED_MASK8 (DISABLE_TDX_GUEST)
7783
#define DISABLED_MASK9 (DISABLE_SGX)
7884
#define DISABLED_MASK10 0
7985
#define DISABLED_MASK11 0

0 commit comments

Comments
 (0)