Skip to content

Commit 9bc83d6

Browse files
committed
tools headers x86 cpufeatures: Sync with the kernel sources
To pick the changes from: 3d8f61b ("x86: KVM: Add common feature flag for AMD's PSFD") 3763bf5 ("x86/cpufeatures: Redefine synthetic virtual NMI bit as AMD's "real" vNMI") 6449dcb ("x86: CPUID and CR3/CR4 flags for Linear Address Masking") be8de49 ("x86/speculation: Identify processors vulnerable to SMT RSB predictions") e7862ed ("x86/cpu: Support AMD Automatic IBRS") faabfcb ("x86/cpu, kvm: Add the SMM_CTL MSR not present feature") 5b909d4 ("x86/cpu, kvm: Add the Null Selector Clears Base feature") 84168ae ("x86/cpu, kvm: Move X86_FEATURE_LFENCE_RDTSC to its native leaf") a9dc9ec ("x86/cpu, kvm: Add the NO_NESTED_DATA_BP feature") f8df91e ("x86/cpufeatures: Add macros for Intel's new fast rep string features") 78335aa ("x86/cpufeatures: Add Bandwidth Monitoring Event Configuration feature flag") f334f72 ("x86/cpufeatures: Add Slow Memory Bandwidth Allocation feature flag") a018d2e ("x86/cpufeatures: Add Architectural PerfMon Extension bit") This causes these perf files to be rebuilt and brings some X86_FEATURE that will be used when updating the copies of tools/arch/x86/lib/mem{cpy,set}_64.S with the kernel sources: 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 Cc: Borislav Petkov (AMD) <bp@alien8.de> Cc: Kim Phillips <kim.phillips@amd.com> Cc: Jim Mattson <jmattson@google.com> Cc: Babu Moger <babu.moger@amd.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Sean Christopherson <seanjc@google.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Tom Lendacky <thomas.lendacky@amd.com> Link: https://lore.kernel.org/lkml/ZGTTw642q8mWgv2Y@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent b633896 commit 9bc83d6

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

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

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
#define X86_FEATURE_SYSENTER32 ( 3*32+15) /* "" sysenter in IA32 userspace */
9898
#define X86_FEATURE_REP_GOOD ( 3*32+16) /* REP microcode works well */
9999
#define X86_FEATURE_AMD_LBR_V2 ( 3*32+17) /* AMD Last Branch Record Extension Version 2 */
100-
#define X86_FEATURE_LFENCE_RDTSC ( 3*32+18) /* "" LFENCE synchronizes RDTSC */
100+
/* FREE, was #define X86_FEATURE_LFENCE_RDTSC ( 3*32+18) "" LFENCE synchronizes RDTSC */
101101
#define X86_FEATURE_ACC_POWER ( 3*32+19) /* AMD Accumulated Power Mechanism */
102102
#define X86_FEATURE_NOPL ( 3*32+20) /* The NOPL (0F 1F) instructions */
103103
#define X86_FEATURE_ALWAYS ( 3*32+21) /* "" Always-present feature */
@@ -226,10 +226,9 @@
226226

227227
/* Virtualization flags: Linux defined, word 8 */
228228
#define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */
229-
#define X86_FEATURE_VNMI ( 8*32+ 1) /* Intel Virtual NMI */
230-
#define X86_FEATURE_FLEXPRIORITY ( 8*32+ 2) /* Intel FlexPriority */
231-
#define X86_FEATURE_EPT ( 8*32+ 3) /* Intel Extended Page Table */
232-
#define X86_FEATURE_VPID ( 8*32+ 4) /* Intel Virtual Processor ID */
229+
#define X86_FEATURE_FLEXPRIORITY ( 8*32+ 1) /* Intel FlexPriority */
230+
#define X86_FEATURE_EPT ( 8*32+ 2) /* Intel Extended Page Table */
231+
#define X86_FEATURE_VPID ( 8*32+ 3) /* Intel Virtual Processor ID */
233232

234233
#define X86_FEATURE_VMMCALL ( 8*32+15) /* Prefer VMMCALL to VMCALL */
235234
#define X86_FEATURE_XENPV ( 8*32+16) /* "" Xen paravirtual guest */
@@ -307,14 +306,21 @@
307306
#define X86_FEATURE_SGX_EDECCSSA (11*32+18) /* "" SGX EDECCSSA user leaf function */
308307
#define X86_FEATURE_CALL_DEPTH (11*32+19) /* "" Call depth tracking for RSB stuffing */
309308
#define X86_FEATURE_MSR_TSX_CTRL (11*32+20) /* "" MSR IA32_TSX_CTRL (Intel) implemented */
309+
#define X86_FEATURE_SMBA (11*32+21) /* "" Slow Memory Bandwidth Allocation */
310+
#define X86_FEATURE_BMEC (11*32+22) /* "" Bandwidth Monitoring Event Configuration */
310311

311312
/* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */
312313
#define X86_FEATURE_AVX_VNNI (12*32+ 4) /* AVX VNNI instructions */
313314
#define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* AVX512 BFLOAT16 instructions */
314315
#define X86_FEATURE_CMPCCXADD (12*32+ 7) /* "" CMPccXADD instructions */
316+
#define X86_FEATURE_ARCH_PERFMON_EXT (12*32+ 8) /* "" Intel Architectural PerfMon Extension */
317+
#define X86_FEATURE_FZRM (12*32+10) /* "" Fast zero-length REP MOVSB */
318+
#define X86_FEATURE_FSRS (12*32+11) /* "" Fast short REP STOSB */
319+
#define X86_FEATURE_FSRC (12*32+12) /* "" Fast short REP {CMPSB,SCASB} */
315320
#define X86_FEATURE_LKGS (12*32+18) /* "" Load "kernel" (userspace) GS */
316321
#define X86_FEATURE_AMX_FP16 (12*32+21) /* "" AMX fp16 Support */
317322
#define X86_FEATURE_AVX_IFMA (12*32+23) /* "" Support for VPMADD52[H,L]UQ */
323+
#define X86_FEATURE_LAM (12*32+26) /* Linear Address Masking */
318324

319325
/* AMD-defined CPU features, CPUID level 0x80000008 (EBX), word 13 */
320326
#define X86_FEATURE_CLZERO (13*32+ 0) /* CLZERO instruction */
@@ -331,6 +337,7 @@
331337
#define X86_FEATURE_VIRT_SSBD (13*32+25) /* Virtualized Speculative Store Bypass Disable */
332338
#define X86_FEATURE_AMD_SSB_NO (13*32+26) /* "" Speculative Store Bypass is fixed in hardware. */
333339
#define X86_FEATURE_CPPC (13*32+27) /* Collaborative Processor Performance Control */
340+
#define X86_FEATURE_AMD_PSFD (13*32+28) /* "" Predictive Store Forwarding Disable */
334341
#define X86_FEATURE_BTC_NO (13*32+29) /* "" Not vulnerable to Branch Type Confusion */
335342
#define X86_FEATURE_BRS (13*32+31) /* Branch Sampling available */
336343

@@ -363,6 +370,7 @@
363370
#define X86_FEATURE_VGIF (15*32+16) /* Virtual GIF */
364371
#define X86_FEATURE_X2AVIC (15*32+18) /* Virtual x2apic */
365372
#define X86_FEATURE_V_SPEC_CTRL (15*32+20) /* Virtual SPEC_CTRL */
373+
#define X86_FEATURE_VNMI (15*32+25) /* Virtual NMI */
366374
#define X86_FEATURE_SVME_ADDR_CHK (15*32+28) /* "" SVME addr check */
367375

368376
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 */
@@ -427,6 +435,13 @@
427435
#define X86_FEATURE_V_TSC_AUX (19*32+ 9) /* "" Virtual TSC_AUX */
428436
#define X86_FEATURE_SME_COHERENT (19*32+10) /* "" AMD hardware-enforced cache coherency */
429437

438+
/* AMD-defined Extended Feature 2 EAX, CPUID level 0x80000021 (EAX), word 20 */
439+
#define X86_FEATURE_NO_NESTED_DATA_BP (20*32+ 0) /* "" No Nested Data Breakpoints */
440+
#define X86_FEATURE_LFENCE_RDTSC (20*32+ 2) /* "" LFENCE always serializing / synchronizes RDTSC */
441+
#define X86_FEATURE_NULL_SEL_CLR_BASE (20*32+ 6) /* "" Null Selector Clears Base */
442+
#define X86_FEATURE_AUTOIBRS (20*32+ 8) /* "" Automatic IBRS */
443+
#define X86_FEATURE_NO_SMM_CTL_MSR (20*32+ 9) /* "" SMM_CTL MSR is not present */
444+
430445
/*
431446
* BUG word(s)
432447
*/
@@ -467,5 +482,6 @@
467482
#define X86_BUG_MMIO_UNKNOWN X86_BUG(26) /* CPU is too old and its MMIO Stale Data status is unknown */
468483
#define X86_BUG_RETBLEED X86_BUG(27) /* CPU is affected by RETBleed */
469484
#define X86_BUG_EIBRS_PBRSB X86_BUG(28) /* EIBRS is vulnerable to Post Barrier RSB Predictions */
485+
#define X86_BUG_SMT_RSB X86_BUG(29) /* CPU is vulnerable to Cross-Thread Return Address Predictions */
470486

471487
#endif /* _ASM_X86_CPUFEATURES_H */

0 commit comments

Comments
 (0)