Skip to content

Commit 369e91b

Browse files
committed
tools headers: Sync x86 headers with kernel sources
To pick up changes from: 54de197 ("Merge tag 'x86_sgx_for_6.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip") 679fcce ("Merge tag 'kvm-x86-svm-6.19' of https://github.com/kvm-x86/linux into HEAD") 3767def ("x86/cpufeatures: Add support for L3 Smart Data Cache Injection Allocation Enforcement") f6106d4 ("x86/bugs: Use an x86 feature to track the MMIO Stale Data mitigation") 7baadd4 ("x86/cpufeatures: Enumerate the LASS feature bits") 47955b5 ("x86/cpufeatures: Correct LKGS feature flag description") 5d0316e ("x86/cpufeatures: Add X86_FEATURE_X2AVIC_EXT") 6ffdb49 ("x86/cpufeatures: Add X86_FEATURE_SGX_EUPDATESVN feature flag") 4793f99 ("KVM: x86: Advertise EferLmsleUnsupported to userspace") bb5f13d ("perf/x86/intel: Add counter group support for arch-PEBS") 52448a0 ("perf/x86/intel: Setup PEBS data configuration and enable legacy groups") d21954c ("perf/x86/intel: Process arch-PEBS records or record fragments") bffeb2f ("x86/microcode/intel: Enable staging when available") 740144b ("x86/microcode/intel: Establish staging control logic") This should address these tools/perf build warnings: Warning: Kernel ABI header differences: diff -u tools/arch/x86/include/asm/cpufeatures.h arch/x86/include/asm/cpufeatures.h diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h Please see tools/include/uapi/README. Cc: x86@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
1 parent c482993 commit 369e91b

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@
314314
#define X86_FEATURE_SM4 (12*32+ 2) /* SM4 instructions */
315315
#define X86_FEATURE_AVX_VNNI (12*32+ 4) /* "avx_vnni" AVX VNNI instructions */
316316
#define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* "avx512_bf16" AVX512 BFLOAT16 instructions */
317+
#define X86_FEATURE_LASS (12*32+ 6) /* "lass" Linear Address Space Separation */
317318
#define X86_FEATURE_CMPCCXADD (12*32+ 7) /* CMPccXADD instructions */
318319
#define X86_FEATURE_ARCH_PERFMON_EXT (12*32+ 8) /* Intel Architectural PerfMon Extension */
319320
#define X86_FEATURE_FZRM (12*32+10) /* Fast zero-length REP MOVSB */
@@ -338,6 +339,7 @@
338339
#define X86_FEATURE_AMD_STIBP (13*32+15) /* Single Thread Indirect Branch Predictors */
339340
#define X86_FEATURE_AMD_STIBP_ALWAYS_ON (13*32+17) /* Single Thread Indirect Branch Predictors always-on preferred */
340341
#define X86_FEATURE_AMD_IBRS_SAME_MODE (13*32+19) /* Indirect Branch Restricted Speculation same mode protection*/
342+
#define X86_FEATURE_EFER_LMSLE_MBZ (13*32+20) /* EFER.LMSLE must be zero */
341343
#define X86_FEATURE_AMD_PPIN (13*32+23) /* "amd_ppin" Protected Processor Inventory Number */
342344
#define X86_FEATURE_AMD_SSBD (13*32+24) /* Speculative Store Bypass Disable */
343345
#define X86_FEATURE_VIRT_SSBD (13*32+25) /* "virt_ssbd" Virtualized Speculative Store Bypass Disable */
@@ -502,6 +504,15 @@
502504
#define X86_FEATURE_IBPB_EXIT_TO_USER (21*32+14) /* Use IBPB on exit-to-userspace, see VMSCAPE bug */
503505
#define X86_FEATURE_ABMC (21*32+15) /* Assignable Bandwidth Monitoring Counters */
504506
#define X86_FEATURE_MSR_IMM (21*32+16) /* MSR immediate form instructions */
507+
#define X86_FEATURE_SGX_EUPDATESVN (21*32+17) /* Support for ENCLS[EUPDATESVN] instruction */
508+
509+
#define X86_FEATURE_SDCIAE (21*32+18) /* L3 Smart Data Cache Injection Allocation Enforcement */
510+
#define X86_FEATURE_CLEAR_CPU_BUF_VM_MMIO (21*32+19) /*
511+
* Clear CPU buffers before VM-Enter if the vCPU
512+
* can access host MMIO (ignored for all intents
513+
* and purposes if CLEAR_CPU_BUF_VM is set).
514+
*/
515+
#define X86_FEATURE_X2AVIC_EXT (21*32+20) /* AMD SVM x2AVIC support for 4k vCPUs */
505516

506517
/*
507518
* BUG word(s)

tools/arch/x86/include/asm/msr-index.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@
166166
* Processor MMIO stale data
167167
* vulnerabilities.
168168
*/
169+
#define ARCH_CAP_MCU_ENUM BIT(16) /*
170+
* Indicates the presence of microcode update
171+
* feature enumeration and status information.
172+
*/
169173
#define ARCH_CAP_FB_CLEAR BIT(17) /*
170174
* VERW clears CPU fill buffer
171175
* even on MDS_NO CPUs.
@@ -327,6 +331,26 @@
327331
PERF_CAP_PEBS_FORMAT | PERF_CAP_PEBS_BASELINE | \
328332
PERF_CAP_PEBS_TIMING_INFO)
329333

334+
/* Arch PEBS */
335+
#define MSR_IA32_PEBS_BASE 0x000003f4
336+
#define MSR_IA32_PEBS_INDEX 0x000003f5
337+
#define ARCH_PEBS_OFFSET_MASK 0x7fffff
338+
#define ARCH_PEBS_INDEX_WR_SHIFT 4
339+
340+
#define ARCH_PEBS_RELOAD 0xffffffff
341+
#define ARCH_PEBS_CNTR_ALLOW BIT_ULL(35)
342+
#define ARCH_PEBS_CNTR_GP BIT_ULL(36)
343+
#define ARCH_PEBS_CNTR_FIXED BIT_ULL(37)
344+
#define ARCH_PEBS_CNTR_METRICS BIT_ULL(38)
345+
#define ARCH_PEBS_LBR_SHIFT 40
346+
#define ARCH_PEBS_LBR (0x3ull << ARCH_PEBS_LBR_SHIFT)
347+
#define ARCH_PEBS_VECR_XMM BIT_ULL(49)
348+
#define ARCH_PEBS_GPR BIT_ULL(61)
349+
#define ARCH_PEBS_AUX BIT_ULL(62)
350+
#define ARCH_PEBS_EN BIT_ULL(63)
351+
#define ARCH_PEBS_CNTR_MASK (ARCH_PEBS_CNTR_GP | ARCH_PEBS_CNTR_FIXED | \
352+
ARCH_PEBS_CNTR_METRICS)
353+
330354
#define MSR_IA32_RTIT_CTL 0x00000570
331355
#define RTIT_CTL_TRACEEN BIT(0)
332356
#define RTIT_CTL_CYCLEACC BIT(1)
@@ -929,6 +953,10 @@
929953
#define MSR_IA32_APICBASE_BASE (0xfffff<<12)
930954

931955
#define MSR_IA32_UCODE_WRITE 0x00000079
956+
957+
#define MSR_IA32_MCU_ENUMERATION 0x0000007b
958+
#define MCU_STAGING BIT(4)
959+
932960
#define MSR_IA32_UCODE_REV 0x0000008b
933961

934962
/* Intel SGX Launch Enclave Public Key Hash MSRs */
@@ -1226,6 +1254,8 @@
12261254
#define MSR_IA32_VMX_VMFUNC 0x00000491
12271255
#define MSR_IA32_VMX_PROCBASED_CTLS3 0x00000492
12281256

1257+
#define MSR_IA32_MCU_STAGING_MBOX_ADDR 0x000007a5
1258+
12291259
/* Resctrl MSRs: */
12301260
/* - Intel: */
12311261
#define MSR_IA32_L3_QOS_CFG 0xc81

0 commit comments

Comments
 (0)