Skip to content

Commit 893d1ea

Browse files
committed
Merge tag 'perf-tools-fixes-for-v5.19-2022-06-26' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
Pull perf tools fixes from Arnaldo Carvalho de Melo: - Enable ignore_missing_thread in 'perf stat', enabling counting with '--pid' when threads disappear during counting session setup - Adjust output data offset for backward compatibility in 'perf inject' - Fix missing free in copy_kcore_dir() in 'perf inject' - Fix caching files with a wrong build ID - Sync drm, cpufeatures, vhost and svn headers with the kernel * tag 'perf-tools-fixes-for-v5.19-2022-06-26' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: tools headers UAPI: Synch KVM's svm.h header with the kernel tools include UAPI: Sync linux/vhost.h with the kernel sources perf stat: Enable ignore_missing_thread perf inject: Adjust output data offset for backward compatibility perf trace beauty: Fix generation of errno id->str table on ALT Linux perf build-id: Fix caching files with a wrong build ID tools headers cpufeatures: Sync with the kernel sources tools headers UAPI: Sync drm/i915_drm.h with the kernel sources perf inject: Fix missing free in copy_kcore_dir()
2 parents 82708bb + f8d8661 commit 893d1ea

File tree

11 files changed

+369
-104
lines changed

11 files changed

+369
-104
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

tools/arch/x86/include/uapi/asm/svm.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@
108108
#define SVM_VMGEXIT_AP_JUMP_TABLE 0x80000005
109109
#define SVM_VMGEXIT_SET_AP_JUMP_TABLE 0
110110
#define SVM_VMGEXIT_GET_AP_JUMP_TABLE 1
111+
#define SVM_VMGEXIT_PSC 0x80000010
112+
#define SVM_VMGEXIT_GUEST_REQUEST 0x80000011
113+
#define SVM_VMGEXIT_EXT_GUEST_REQUEST 0x80000012
114+
#define SVM_VMGEXIT_AP_CREATION 0x80000013
115+
#define SVM_VMGEXIT_AP_CREATE_ON_INIT 0
116+
#define SVM_VMGEXIT_AP_CREATE 1
117+
#define SVM_VMGEXIT_AP_DESTROY 2
118+
#define SVM_VMGEXIT_HV_FEATURES 0x8000fffd
111119
#define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffff
112120

113121
/* Exit code reserved for hypervisor/software use */
@@ -218,6 +226,11 @@
218226
{ SVM_VMGEXIT_NMI_COMPLETE, "vmgexit_nmi_complete" }, \
219227
{ SVM_VMGEXIT_AP_HLT_LOOP, "vmgexit_ap_hlt_loop" }, \
220228
{ SVM_VMGEXIT_AP_JUMP_TABLE, "vmgexit_ap_jump_table" }, \
229+
{ SVM_VMGEXIT_PSC, "vmgexit_page_state_change" }, \
230+
{ SVM_VMGEXIT_GUEST_REQUEST, "vmgexit_guest_request" }, \
231+
{ SVM_VMGEXIT_EXT_GUEST_REQUEST, "vmgexit_ext_guest_request" }, \
232+
{ SVM_VMGEXIT_AP_CREATION, "vmgexit_ap_creation" }, \
233+
{ SVM_VMGEXIT_HV_FEATURES, "vmgexit_hypervisor_feature" }, \
221234
{ SVM_EXIT_ERR, "invalid_guest_state" }
222235

223236

0 commit comments

Comments
 (0)