Skip to content

Commit b848138

Browse files
committed
Merge tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools
Pull perf tools fixes from Arnaldo Carvalho de Melo: - Update copies of kernel headers, which resulted in support for the new 'mseal' syscall, SUBVOL statx return mask bit, RISC-V and PPC prctls, fcntl's DUPFD_QUERY, POSTED_MSI_NOTIFICATION IRQ vector, 'map_shadow_stack' syscall for x86-32. - Revert perf.data record memory allocation optimization that ended up causing a regression, work is being done to re-introduce it in the next merge window. - Fix handling of minimal vmlinux.h file used with BPF's CO-RE when interrupting the build. * tag 'perf-tools-fixes-for-v6.10-2-2024-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools: perf bpf: Fix handling of minimal vmlinux.h file when interrupting the build Revert "perf record: Reduce memory for recording PERF_RECORD_LOST_SAMPLES event" tools headers arm64: Sync arm64's cputype.h with the kernel sources tools headers uapi: Sync linux/stat.h with the kernel sources to pick STATX_SUBVOL tools headers UAPI: Update i915_drm.h with the kernel sources tools headers UAPI: Sync kvm headers with the kernel sources tools arch x86: Sync the msr-index.h copy with the kernel sources tools headers: Update the syscall tables and unistd.h, mostly to support the new 'mseal' syscall perf trace beauty: Update the arch/x86/include/asm/irq_vectors.h copy with the kernel sources to pick POSTED_MSI_NOTIFICATION perf beauty: Update copy of linux/socket.h with the kernel sources tools headers UAPI: Sync fcntl.h with the kernel sources to pick F_DUPFD_QUERY tools headers UAPI: Sync linux/prctl.h with the kernel sources tools include UAPI: Sync linux/stat.h with the kernel sources
2 parents 637c2df + ca96808 commit b848138

File tree

19 files changed

+118
-29
lines changed

19 files changed

+118
-29
lines changed

tools/arch/arm64/include/asm/cputype.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@
8686
#define ARM_CPU_PART_CORTEX_X2 0xD48
8787
#define ARM_CPU_PART_NEOVERSE_N2 0xD49
8888
#define ARM_CPU_PART_CORTEX_A78C 0xD4B
89+
#define ARM_CPU_PART_NEOVERSE_V2 0xD4F
90+
#define ARM_CPU_PART_CORTEX_X4 0xD82
91+
#define ARM_CPU_PART_NEOVERSE_V3 0xD84
8992

9093
#define APM_CPU_PART_XGENE 0x000
9194
#define APM_CPU_VAR_POTENZA 0x00
@@ -159,6 +162,9 @@
159162
#define MIDR_CORTEX_X2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X2)
160163
#define MIDR_NEOVERSE_N2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_N2)
161164
#define MIDR_CORTEX_A78C MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_A78C)
165+
#define MIDR_NEOVERSE_V2 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V2)
166+
#define MIDR_CORTEX_X4 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_CORTEX_X4)
167+
#define MIDR_NEOVERSE_V3 MIDR_CPU_MODEL(ARM_CPU_IMP_ARM, ARM_CPU_PART_NEOVERSE_V3)
162168
#define MIDR_THUNDERX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX)
163169
#define MIDR_THUNDERX_81XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_81XX)
164170
#define MIDR_THUNDERX_83XX MIDR_CPU_MODEL(ARM_CPU_IMP_CAVIUM, CAVIUM_CPU_PART_THUNDERX_83XX)

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@
170170
* CPU is not affected by Branch
171171
* History Injection.
172172
*/
173+
#define ARCH_CAP_XAPIC_DISABLE BIT(21) /*
174+
* IA32_XAPIC_DISABLE_STATUS MSR
175+
* supported
176+
*/
173177
#define ARCH_CAP_PBRSB_NO BIT(24) /*
174178
* Not susceptible to Post-Barrier
175179
* Return Stack Buffer Predictions.
@@ -192,11 +196,6 @@
192196
* File.
193197
*/
194198

195-
#define ARCH_CAP_XAPIC_DISABLE BIT(21) /*
196-
* IA32_XAPIC_DISABLE_STATUS MSR
197-
* supported
198-
*/
199-
200199
#define MSR_IA32_FLUSH_CMD 0x0000010b
201200
#define L1D_FLUSH BIT(0) /*
202201
* Writeback and invalidate the

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

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,13 @@ struct kvm_sync_regs {
457457

458458
#define KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE 0x00000001
459459

460-
/* attributes for system fd (group 0) */
461-
#define KVM_X86_XCOMP_GUEST_SUPP 0
460+
/* vendor-independent attributes for system fd (group 0) */
461+
#define KVM_X86_GRP_SYSTEM 0
462+
# define KVM_X86_XCOMP_GUEST_SUPP 0
463+
464+
/* vendor-specific groups and attributes for system fd */
465+
#define KVM_X86_GRP_SEV 1
466+
# define KVM_X86_SEV_VMSA_FEATURES 0
462467

463468
struct kvm_vmx_nested_state_data {
464469
__u8 vmcs12[KVM_STATE_NESTED_VMX_VMCS_SIZE];
@@ -689,6 +694,9 @@ enum sev_cmd_id {
689694
/* Guest Migration Extension */
690695
KVM_SEV_SEND_CANCEL,
691696

697+
/* Second time is the charm; improved versions of the above ioctls. */
698+
KVM_SEV_INIT2,
699+
692700
KVM_SEV_NR_MAX,
693701
};
694702

@@ -700,6 +708,14 @@ struct kvm_sev_cmd {
700708
__u32 sev_fd;
701709
};
702710

711+
struct kvm_sev_init {
712+
__u64 vmsa_features;
713+
__u32 flags;
714+
__u16 ghcb_version;
715+
__u16 pad1;
716+
__u32 pad2[8];
717+
};
718+
703719
struct kvm_sev_launch_start {
704720
__u32 handle;
705721
__u32 policy;
@@ -856,5 +872,7 @@ struct kvm_hyperv_eventfd {
856872

857873
#define KVM_X86_DEFAULT_VM 0
858874
#define KVM_X86_SW_PROTECTED_VM 1
875+
#define KVM_X86_SEV_VM 2
876+
#define KVM_X86_SEV_ES_VM 3
859877

860878
#endif /* _ASM_X86_KVM_H */

tools/include/uapi/asm-generic/unistd.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,8 +842,11 @@ __SYSCALL(__NR_lsm_set_self_attr, sys_lsm_set_self_attr)
842842
#define __NR_lsm_list_modules 461
843843
__SYSCALL(__NR_lsm_list_modules, sys_lsm_list_modules)
844844

845+
#define __NR_mseal 462
846+
__SYSCALL(__NR_mseal, sys_mseal)
847+
845848
#undef __NR_syscalls
846-
#define __NR_syscalls 462
849+
#define __NR_syscalls 463
847850

848851
/*
849852
* 32 bit systems traditionally used different

tools/include/uapi/drm/i915_drm.h

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -806,6 +806,12 @@ typedef struct drm_i915_irq_wait {
806806
*/
807807
#define I915_PARAM_PXP_STATUS 58
808808

809+
/*
810+
* Query if kernel allows marking a context to send a Freq hint to SLPC. This
811+
* will enable use of the strategies allowed by the SLPC algorithm.
812+
*/
813+
#define I915_PARAM_HAS_CONTEXT_FREQ_HINT 59
814+
809815
/* Must be kept compact -- no holes and well documented */
810816

811817
/**
@@ -2148,6 +2154,15 @@ struct drm_i915_gem_context_param {
21482154
* -EIO: The firmware did not succeed in creating the protected context.
21492155
*/
21502156
#define I915_CONTEXT_PARAM_PROTECTED_CONTENT 0xd
2157+
2158+
/*
2159+
* I915_CONTEXT_PARAM_LOW_LATENCY:
2160+
*
2161+
* Mark this context as a low latency workload which requires aggressive GT
2162+
* frequency scaling. Use I915_PARAM_HAS_CONTEXT_FREQ_HINT to check if the kernel
2163+
* supports this per context flag.
2164+
*/
2165+
#define I915_CONTEXT_PARAM_LOW_LATENCY 0xe
21512166
/* Must be kept compact -- no holes and well documented */
21522167

21532168
/** @value: Context parameter value to be set or queried */
@@ -2623,19 +2638,29 @@ struct drm_i915_reg_read {
26232638
*
26242639
*/
26252640

2641+
/*
2642+
* struct drm_i915_reset_stats - Return global reset and other context stats
2643+
*
2644+
* Driver keeps few stats for each contexts and also global reset count.
2645+
* This struct can be used to query those stats.
2646+
*/
26262647
struct drm_i915_reset_stats {
2648+
/** @ctx_id: ID of the requested context */
26272649
__u32 ctx_id;
2650+
2651+
/** @flags: MBZ */
26282652
__u32 flags;
26292653

2630-
/* All resets since boot/module reload, for all contexts */
2654+
/** @reset_count: All resets since boot/module reload, for all contexts */
26312655
__u32 reset_count;
26322656

2633-
/* Number of batches lost when active in GPU, for this context */
2657+
/** @batch_active: Number of batches lost when active in GPU, for this context */
26342658
__u32 batch_active;
26352659

2636-
/* Number of batches lost pending for execution, for this context */
2660+
/** @batch_pending: Number of batches lost pending for execution, for this context */
26372661
__u32 batch_pending;
26382662

2663+
/** @pad: MBZ */
26392664
__u32 pad;
26402665
};
26412666

tools/include/uapi/linux/kvm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,9 +1221,9 @@ struct kvm_vfio_spapr_tce {
12211221
/* Available with KVM_CAP_SPAPR_RESIZE_HPT */
12221222
#define KVM_PPC_RESIZE_HPT_PREPARE _IOR(KVMIO, 0xad, struct kvm_ppc_resize_hpt)
12231223
#define KVM_PPC_RESIZE_HPT_COMMIT _IOR(KVMIO, 0xae, struct kvm_ppc_resize_hpt)
1224-
/* Available with KVM_CAP_PPC_RADIX_MMU or KVM_CAP_PPC_MMU_HASH_V3 */
1224+
/* Available with KVM_CAP_PPC_MMU_RADIX or KVM_CAP_PPC_MMU_HASH_V3 */
12251225
#define KVM_PPC_CONFIGURE_V3_MMU _IOW(KVMIO, 0xaf, struct kvm_ppc_mmuv3_cfg)
1226-
/* Available with KVM_CAP_PPC_RADIX_MMU */
1226+
/* Available with KVM_CAP_PPC_MMU_RADIX */
12271227
#define KVM_PPC_GET_RMMU_INFO _IOW(KVMIO, 0xb0, struct kvm_ppc_rmmu_info)
12281228
/* Available with KVM_CAP_PPC_GET_CPU_CHAR */
12291229
#define KVM_PPC_GET_CPU_CHAR _IOR(KVMIO, 0xb1, struct kvm_ppc_cpu_char)

tools/include/uapi/linux/stat.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ struct statx {
126126
__u64 stx_mnt_id;
127127
__u32 stx_dio_mem_align; /* Memory buffer alignment for direct I/O */
128128
__u32 stx_dio_offset_align; /* File offset alignment for direct I/O */
129+
__u64 stx_subvol; /* Subvolume identifier */
129130
/* 0xa0 */
130-
__u64 __spare3[12]; /* Spare space for future expansion */
131+
__u64 __spare3[11]; /* Spare space for future expansion */
131132
/* 0x100 */
132133
};
133134

@@ -155,6 +156,7 @@ struct statx {
155156
#define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */
156157
#define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */
157158
#define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */
159+
#define STATX_SUBVOL 0x00008000U /* Want/got stx_subvol */
158160

159161
#define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
160162

tools/perf/Makefile.perf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ NON_CONFIG_TARGETS := clean python-clean TAGS tags cscope help
214214

215215
ifdef MAKECMDGOALS
216216
ifeq ($(filter-out $(NON_CONFIG_TARGETS),$(MAKECMDGOALS)),)
217+
VMLINUX_H=$(src-perf)/util/bpf_skel/vmlinux/vmlinux.h
217218
config := 0
218219
endif
219220
endif

tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,3 +376,4 @@
376376
459 n64 lsm_get_self_attr sys_lsm_get_self_attr
377377
460 n64 lsm_set_self_attr sys_lsm_set_self_attr
378378
461 n64 lsm_list_modules sys_lsm_list_modules
379+
462 n64 mseal sys_mseal

tools/perf/arch/powerpc/entry/syscalls/syscall.tbl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,3 +548,4 @@
548548
459 common lsm_get_self_attr sys_lsm_get_self_attr
549549
460 common lsm_set_self_attr sys_lsm_set_self_attr
550550
461 common lsm_list_modules sys_lsm_list_modules
551+
462 common mseal sys_mseal

0 commit comments

Comments
 (0)