Skip to content

Commit b3c303b

Browse files
author
Ingo Molnar
committed
Merge tag 'perf-urgent-for-mingo-5.3-20190729' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/urgent fixes from Arnaldo Carvalho de Melo: perf header: Vince Weaver: - Fix divide by zero error if f_header.attr_size==0, found using a perf tool fuzzer. Numfor Mbiziwo-Tiapo: - Silence use of uninitialized value warning pointed out by clang's MSAN tool. libbpf: Andrii Nakryiko: - Fix missing __WORDSIZE definition in some systems, such as musl libc (Alpine Linux). tools header UAPI: Arnaldo Carvalho de Melo: - Sync headers to address perf build warnings: - syscalls_64.tbl and generic unistd.h to pick up clone3 and pidfd_open. - With new ioctls: kvm.h, drm.h and usbdevice_fs.h. - No tooling change: mman.h, sched.h and if_link.h. Documentation: Vince Weaver: - Fix perf.data documentation units for memory size, its kB, not bytes. Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
2 parents 2a11c76 + 8aa259b commit b3c303b

File tree

20 files changed

+352
-35
lines changed

20 files changed

+352
-35
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,18 @@ struct kvm_vcpu_events {
214214
#define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM | KVM_REG_SIZE_U64 | \
215215
KVM_REG_ARM_FW | ((r) & 0xffff))
216216
#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0)
217+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1 KVM_REG_ARM_FW_REG(1)
218+
/* Higher values mean better protection. */
219+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_AVAIL 0
220+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_AVAIL 1
221+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_REQUIRED 2
222+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2 KVM_REG_ARM_FW_REG(2)
223+
/* Higher values mean better protection. */
224+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_AVAIL 0
225+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_UNKNOWN 1
226+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_AVAIL 2
227+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_REQUIRED 3
228+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_ENABLED (1U << 4)
217229

218230
/* Device Control API: ARM VGIC */
219231
#define KVM_DEV_ARM_VGIC_GRP_ADDR 0

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,16 @@ struct kvm_vcpu_events {
229229
#define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM64 | KVM_REG_SIZE_U64 | \
230230
KVM_REG_ARM_FW | ((r) & 0xffff))
231231
#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0)
232+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1 KVM_REG_ARM_FW_REG(1)
233+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_AVAIL 0
234+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_AVAIL 1
235+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_REQUIRED 2
236+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2 KVM_REG_ARM_FW_REG(2)
237+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_AVAIL 0
238+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_UNKNOWN 1
239+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_AVAIL 2
240+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_REQUIRED 3
241+
#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_ENABLED (1U << 4)
232242

233243
/* SVE registers */
234244
#define KVM_REG_ARM64_SVE (0x15 << KVM_REG_ARM_COPROC_SHIFT)

tools/arch/powerpc/include/uapi/asm/mman.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44
#define MAP_DENYWRITE 0x0800
55
#define MAP_EXECUTABLE 0x1000
66
#define MAP_GROWSDOWN 0x0100
7-
#define MAP_HUGETLB 0x40000
87
#define MAP_LOCKED 0x80
9-
#define MAP_NONBLOCK 0x10000
108
#define MAP_NORESERVE 0x40
11-
#define MAP_POPULATE 0x8000
12-
#define MAP_STACK 0x20000
139
#include <uapi/asm-generic/mman-common.h>
1410
/* MAP_32BIT is undefined on powerpc, fix it for perf */
1511
#define MAP_32BIT 0

tools/arch/sparc/include/uapi/asm/mman.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@
44
#define MAP_DENYWRITE 0x0800
55
#define MAP_EXECUTABLE 0x1000
66
#define MAP_GROWSDOWN 0x0200
7-
#define MAP_HUGETLB 0x40000
87
#define MAP_LOCKED 0x100
9-
#define MAP_NONBLOCK 0x10000
108
#define MAP_NORESERVE 0x40
11-
#define MAP_POPULATE 0x8000
12-
#define MAP_STACK 0x20000
139
#include <uapi/asm-generic/mman-common.h>
1410
/* MAP_32BIT is undefined on sparc, fix it for perf */
1511
#define MAP_32BIT 0

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

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,11 @@ struct kvm_sync_regs {
378378
struct kvm_vcpu_events events;
379379
};
380380

381-
#define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0)
382-
#define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1)
383-
#define KVM_X86_QUIRK_LAPIC_MMIO_HOLE (1 << 2)
384-
#define KVM_X86_QUIRK_OUT_7E_INC_RIP (1 << 3)
381+
#define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0)
382+
#define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1)
383+
#define KVM_X86_QUIRK_LAPIC_MMIO_HOLE (1 << 2)
384+
#define KVM_X86_QUIRK_OUT_7E_INC_RIP (1 << 3)
385+
#define KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT (1 << 4)
385386

386387
#define KVM_STATE_NESTED_FORMAT_VMX 0
387388
#define KVM_STATE_NESTED_FORMAT_SVM 1 /* unused */
@@ -432,4 +433,17 @@ struct kvm_nested_state {
432433
} data;
433434
};
434435

436+
/* for KVM_CAP_PMU_EVENT_FILTER */
437+
struct kvm_pmu_event_filter {
438+
__u32 action;
439+
__u32 nevents;
440+
__u32 fixed_counter_bitmap;
441+
__u32 flags;
442+
__u32 pad[4];
443+
__u64 events[0];
444+
};
445+
446+
#define KVM_PMU_EVENT_ALLOW 0
447+
#define KVM_PMU_EVENT_DENY 1
448+
435449
#endif /* _ASM_X86_KVM_H */

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@
146146

147147
#define VMX_ABORT_SAVE_GUEST_MSR_FAIL 1
148148
#define VMX_ABORT_LOAD_HOST_PDPTE_FAIL 2
149-
#define VMX_ABORT_VMCS_CORRUPTED 3
150149
#define VMX_ABORT_LOAD_HOST_MSR_FAIL 4
151150

152151
#endif /* _UAPIVMX_H */

tools/include/uapi/asm-generic/mman-common.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@
1919
#define MAP_TYPE 0x0f /* Mask for type of mapping */
2020
#define MAP_FIXED 0x10 /* Interpret addr exactly */
2121
#define MAP_ANONYMOUS 0x20 /* don't use a file */
22-
#ifdef CONFIG_MMAP_ALLOW_UNINITIALIZED
23-
# define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be uninitialized */
24-
#else
25-
# define MAP_UNINITIALIZED 0x0 /* Don't support this flag */
26-
#endif
2722

28-
/* 0x0100 - 0x80000 flags are defined in asm-generic/mman.h */
23+
/* 0x0100 - 0x4000 flags are defined in asm-generic/mman.h */
24+
#define MAP_POPULATE 0x008000 /* populate (prefault) pagetables */
25+
#define MAP_NONBLOCK 0x010000 /* do not block on IO */
26+
#define MAP_STACK 0x020000 /* give out an address that is best suited for process/thread stacks */
27+
#define MAP_HUGETLB 0x040000 /* create a huge page mapping */
28+
#define MAP_SYNC 0x080000 /* perform synchronous page faults for the mapping */
2929
#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED which doesn't unmap underlying mapping */
3030

31+
#define MAP_UNINITIALIZED 0x4000000 /* For anonymous mmap, memory could be
32+
* uninitialized */
33+
3134
/*
3235
* Flags for mlock
3336
*/

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
99
#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
1010
#define MAP_LOCKED 0x2000 /* pages are locked */
1111
#define MAP_NORESERVE 0x4000 /* don't check for reservations */
12-
#define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */
13-
#define MAP_NONBLOCK 0x10000 /* do not block on IO */
14-
#define MAP_STACK 0x20000 /* give out an address that is best suited for process/thread stacks */
15-
#define MAP_HUGETLB 0x40000 /* create a huge page mapping */
16-
#define MAP_SYNC 0x80000 /* perform synchronous page faults for the mapping */
1712

18-
/* Bits [26:31] are reserved, see mman-common.h for MAP_HUGETLB usage */
13+
/*
14+
* Bits [26:31] are reserved, see asm-generic/hugetlb_encode.h
15+
* for MAP_HUGETLB usage
16+
*/
1917

2018
#define MCL_CURRENT 1 /* lock all current mappings */
2119
#define MCL_FUTURE 2 /* lock all future mappings */

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,9 +844,15 @@ __SYSCALL(__NR_fsconfig, sys_fsconfig)
844844
__SYSCALL(__NR_fsmount, sys_fsmount)
845845
#define __NR_fspick 433
846846
__SYSCALL(__NR_fspick, sys_fspick)
847+
#define __NR_pidfd_open 434
848+
__SYSCALL(__NR_pidfd_open, sys_pidfd_open)
849+
#ifdef __ARCH_WANT_SYS_CLONE3
850+
#define __NR_clone3 435
851+
__SYSCALL(__NR_clone3, sys_clone3)
852+
#endif
847853

848854
#undef __NR_syscalls
849-
#define __NR_syscalls 434
855+
#define __NR_syscalls 436
850856

851857
/*
852858
* 32 bit systems traditionally used different

tools/include/uapi/drm/drm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ typedef unsigned int drm_handle_t;
5050

5151
#else /* One of the BSDs */
5252

53+
#include <stdint.h>
5354
#include <sys/ioccom.h>
5455
#include <sys/types.h>
5556
typedef int8_t __s8;

0 commit comments

Comments
 (0)