diff options
26 files changed, 288 insertions, 103 deletions
diff --git a/tools/arch/alpha/include/uapi/asm/mman.h b/tools/arch/alpha/include/uapi/asm/mman.h index c317d3e6867a..ea6a255ae61f 100644 --- a/tools/arch/alpha/include/uapi/asm/mman.h +++ b/tools/arch/alpha/include/uapi/asm/mman.h | |||
| @@ -27,8 +27,6 @@ | |||
| 27 | #define MAP_NONBLOCK 0x40000 | 27 | #define MAP_NONBLOCK 0x40000 |
| 28 | #define MAP_NORESERVE 0x10000 | 28 | #define MAP_NORESERVE 0x10000 |
| 29 | #define MAP_POPULATE 0x20000 | 29 | #define MAP_POPULATE 0x20000 |
| 30 | #define MAP_PRIVATE 0x02 | ||
| 31 | #define MAP_SHARED 0x01 | ||
| 32 | #define MAP_STACK 0x80000 | 30 | #define MAP_STACK 0x80000 |
| 33 | #define PROT_EXEC 0x4 | 31 | #define PROT_EXEC 0x4 |
| 34 | #define PROT_GROWSDOWN 0x01000000 | 32 | #define PROT_GROWSDOWN 0x01000000 |
diff --git a/tools/arch/mips/include/uapi/asm/mman.h b/tools/arch/mips/include/uapi/asm/mman.h index de2206883abc..c8acaa138d46 100644 --- a/tools/arch/mips/include/uapi/asm/mman.h +++ b/tools/arch/mips/include/uapi/asm/mman.h | |||
| @@ -28,8 +28,6 @@ | |||
| 28 | #define MAP_NONBLOCK 0x20000 | 28 | #define MAP_NONBLOCK 0x20000 |
| 29 | #define MAP_NORESERVE 0x0400 | 29 | #define MAP_NORESERVE 0x0400 |
| 30 | #define MAP_POPULATE 0x10000 | 30 | #define MAP_POPULATE 0x10000 |
| 31 | #define MAP_PRIVATE 0x002 | ||
| 32 | #define MAP_SHARED 0x001 | ||
| 33 | #define MAP_STACK 0x40000 | 31 | #define MAP_STACK 0x40000 |
| 34 | #define PROT_EXEC 0x04 | 32 | #define PROT_EXEC 0x04 |
| 35 | #define PROT_GROWSDOWN 0x01000000 | 33 | #define PROT_GROWSDOWN 0x01000000 |
diff --git a/tools/arch/parisc/include/uapi/asm/mman.h b/tools/arch/parisc/include/uapi/asm/mman.h index 1bd78758bde9..f9fd1325f5bd 100644 --- a/tools/arch/parisc/include/uapi/asm/mman.h +++ b/tools/arch/parisc/include/uapi/asm/mman.h | |||
| @@ -27,8 +27,6 @@ | |||
| 27 | #define MAP_NONBLOCK 0x20000 | 27 | #define MAP_NONBLOCK 0x20000 |
| 28 | #define MAP_NORESERVE 0x4000 | 28 | #define MAP_NORESERVE 0x4000 |
| 29 | #define MAP_POPULATE 0x10000 | 29 | #define MAP_POPULATE 0x10000 |
| 30 | #define MAP_PRIVATE 0x02 | ||
| 31 | #define MAP_SHARED 0x01 | ||
| 32 | #define MAP_STACK 0x40000 | 30 | #define MAP_STACK 0x40000 |
| 33 | #define PROT_EXEC 0x4 | 31 | #define PROT_EXEC 0x4 |
| 34 | #define PROT_GROWSDOWN 0x01000000 | 32 | #define PROT_GROWSDOWN 0x01000000 |
diff --git a/tools/arch/powerpc/include/uapi/asm/kvm.h b/tools/arch/powerpc/include/uapi/asm/kvm.h index 8c876c166ef2..26ca425f4c2c 100644 --- a/tools/arch/powerpc/include/uapi/asm/kvm.h +++ b/tools/arch/powerpc/include/uapi/asm/kvm.h | |||
| @@ -463,10 +463,12 @@ struct kvm_ppc_cpu_char { | |||
| 463 | #define KVM_PPC_CPU_CHAR_BR_HINT_HONOURED (1ULL << 58) | 463 | #define KVM_PPC_CPU_CHAR_BR_HINT_HONOURED (1ULL << 58) |
| 464 | #define KVM_PPC_CPU_CHAR_MTTRIG_THR_RECONF (1ULL << 57) | 464 | #define KVM_PPC_CPU_CHAR_MTTRIG_THR_RECONF (1ULL << 57) |
| 465 | #define KVM_PPC_CPU_CHAR_COUNT_CACHE_DIS (1ULL << 56) | 465 | #define KVM_PPC_CPU_CHAR_COUNT_CACHE_DIS (1ULL << 56) |
| 466 | #define KVM_PPC_CPU_CHAR_BCCTR_FLUSH_ASSIST (1ull << 54) | ||
| 466 | 467 | ||
| 467 | #define KVM_PPC_CPU_BEHAV_FAVOUR_SECURITY (1ULL << 63) | 468 | #define KVM_PPC_CPU_BEHAV_FAVOUR_SECURITY (1ULL << 63) |
| 468 | #define KVM_PPC_CPU_BEHAV_L1D_FLUSH_PR (1ULL << 62) | 469 | #define KVM_PPC_CPU_BEHAV_L1D_FLUSH_PR (1ULL << 62) |
| 469 | #define KVM_PPC_CPU_BEHAV_BNDS_CHK_SPEC_BAR (1ULL << 61) | 470 | #define KVM_PPC_CPU_BEHAV_BNDS_CHK_SPEC_BAR (1ULL << 61) |
| 471 | #define KVM_PPC_CPU_BEHAV_FLUSH_COUNT_CACHE (1ull << 58) | ||
| 470 | 472 | ||
| 471 | /* Per-vcpu XICS interrupt controller state */ | 473 | /* Per-vcpu XICS interrupt controller state */ |
| 472 | #define KVM_REG_PPC_ICP_STATE (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8c) | 474 | #define KVM_REG_PPC_ICP_STATE (KVM_REG_PPC | KVM_REG_SIZE_U64 | 0x8c) |
diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/include/asm/cpufeatures.h index 6d6122524711..981ff9479648 100644 --- a/tools/arch/x86/include/asm/cpufeatures.h +++ b/tools/arch/x86/include/asm/cpufeatures.h | |||
| @@ -344,6 +344,7 @@ | |||
| 344 | /* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */ | 344 | /* Intel-defined CPU features, CPUID level 0x00000007:0 (EDX), word 18 */ |
| 345 | #define X86_FEATURE_AVX512_4VNNIW (18*32+ 2) /* AVX-512 Neural Network Instructions */ | 345 | #define X86_FEATURE_AVX512_4VNNIW (18*32+ 2) /* AVX-512 Neural Network Instructions */ |
| 346 | #define X86_FEATURE_AVX512_4FMAPS (18*32+ 3) /* AVX-512 Multiply Accumulation Single precision */ | 346 | #define X86_FEATURE_AVX512_4FMAPS (18*32+ 3) /* AVX-512 Multiply Accumulation Single precision */ |
| 347 | #define X86_FEATURE_TSX_FORCE_ABORT (18*32+13) /* "" TSX_FORCE_ABORT */ | ||
| 347 | #define X86_FEATURE_PCONFIG (18*32+18) /* Intel PCONFIG */ | 348 | #define X86_FEATURE_PCONFIG (18*32+18) /* Intel PCONFIG */ |
| 348 | #define X86_FEATURE_SPEC_CTRL (18*32+26) /* "" Speculation Control (IBRS + IBPB) */ | 349 | #define X86_FEATURE_SPEC_CTRL (18*32+26) /* "" Speculation Control (IBRS + IBPB) */ |
| 349 | #define X86_FEATURE_INTEL_STIBP (18*32+27) /* "" Single Thread Indirect Branch Predictors */ | 350 | #define X86_FEATURE_INTEL_STIBP (18*32+27) /* "" Single Thread Indirect Branch Predictors */ |
diff --git a/tools/arch/xtensa/include/uapi/asm/mman.h b/tools/arch/xtensa/include/uapi/asm/mman.h index 34dde6f44dae..f2b08c990afc 100644 --- a/tools/arch/xtensa/include/uapi/asm/mman.h +++ b/tools/arch/xtensa/include/uapi/asm/mman.h | |||
| @@ -27,8 +27,6 @@ | |||
| 27 | #define MAP_NONBLOCK 0x20000 | 27 | #define MAP_NONBLOCK 0x20000 |
| 28 | #define MAP_NORESERVE 0x0400 | 28 | #define MAP_NORESERVE 0x0400 |
| 29 | #define MAP_POPULATE 0x10000 | 29 | #define MAP_POPULATE 0x10000 |
| 30 | #define MAP_PRIVATE 0x002 | ||
| 31 | #define MAP_SHARED 0x001 | ||
| 32 | #define MAP_STACK 0x40000 | 30 | #define MAP_STACK 0x40000 |
| 33 | #define PROT_EXEC 0x4 | 31 | #define PROT_EXEC 0x4 |
| 34 | #define PROT_GROWSDOWN 0x01000000 | 32 | #define PROT_GROWSDOWN 0x01000000 |
diff --git a/tools/build/feature/test-libopencsd.c b/tools/build/feature/test-libopencsd.c index d68eb4fb40cc..2b0e02c38870 100644 --- a/tools/build/feature/test-libopencsd.c +++ b/tools/build/feature/test-libopencsd.c | |||
| @@ -4,9 +4,9 @@ | |||
| 4 | /* | 4 | /* |
| 5 | * Check OpenCSD library version is sufficient to provide required features | 5 | * Check OpenCSD library version is sufficient to provide required features |
| 6 | */ | 6 | */ |
| 7 | #define OCSD_MIN_VER ((0 << 16) | (10 << 8) | (0)) | 7 | #define OCSD_MIN_VER ((0 << 16) | (11 << 8) | (0)) |
| 8 | #if !defined(OCSD_VER_NUM) || (OCSD_VER_NUM < OCSD_MIN_VER) | 8 | #if !defined(OCSD_VER_NUM) || (OCSD_VER_NUM < OCSD_MIN_VER) |
| 9 | #error "OpenCSD >= 0.10.0 is required" | 9 | #error "OpenCSD >= 0.11.0 is required" |
| 10 | #endif | 10 | #endif |
| 11 | 11 | ||
| 12 | int main(void) | 12 | int main(void) |
diff --git a/tools/include/uapi/asm-generic/mman-common-tools.h b/tools/include/uapi/asm-generic/mman-common-tools.h new file mode 100644 index 000000000000..af7d0d3a3182 --- /dev/null +++ b/tools/include/uapi/asm-generic/mman-common-tools.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | #ifndef __ASM_GENERIC_MMAN_COMMON_TOOLS_ONLY_H | ||
| 3 | #define __ASM_GENERIC_MMAN_COMMON_TOOLS_ONLY_H | ||
| 4 | |||
| 5 | #include <asm-generic/mman-common.h> | ||
| 6 | |||
| 7 | /* We need this because we need to have tools/include/uapi/ included in the tools | ||
| 8 | * header search path to get access to stuff that is not yet in the system's | ||
| 9 | * copy of the files in that directory, but since this cset: | ||
| 10 | * | ||
| 11 | * 746c9398f5ac ("arch: move common mmap flags to linux/mman.h") | ||
| 12 | * | ||
| 13 | * We end up making sys/mman.h, that is in the system headers, to not find the | ||
| 14 | * MAP_SHARED and MAP_PRIVATE defines because they are not anymore in our copy | ||
| 15 | * of asm-generic/mman-common.h. So we define them here and include this header | ||
| 16 | * from each of the per arch mman.h headers. | ||
| 17 | */ | ||
| 18 | #ifndef MAP_SHARED | ||
| 19 | #define MAP_SHARED 0x01 /* Share changes */ | ||
| 20 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
| 21 | #define MAP_SHARED_VALIDATE 0x03 /* share + validate extension flags */ | ||
| 22 | #endif | ||
| 23 | #endif // __ASM_GENERIC_MMAN_COMMON_TOOLS_ONLY_H | ||
diff --git a/tools/include/uapi/asm-generic/mman-common.h b/tools/include/uapi/asm-generic/mman-common.h index e7ee32861d51..abd238d0f7a4 100644 --- a/tools/include/uapi/asm-generic/mman-common.h +++ b/tools/include/uapi/asm-generic/mman-common.h | |||
| @@ -15,9 +15,7 @@ | |||
| 15 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | 15 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ |
| 16 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | 16 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ |
| 17 | 17 | ||
| 18 | #define MAP_SHARED 0x01 /* Share changes */ | 18 | /* 0x01 - 0x03 are defined in linux/mman.h */ |
| 19 | #define MAP_PRIVATE 0x02 /* Changes are private */ | ||
| 20 | #define MAP_SHARED_VALIDATE 0x03 /* share + validate extension flags */ | ||
| 21 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ | 19 | #define MAP_TYPE 0x0f /* Mask for type of mapping */ |
| 22 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ | 20 | #define MAP_FIXED 0x10 /* Interpret addr exactly */ |
| 23 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ | 21 | #define MAP_ANONYMOUS 0x20 /* don't use a file */ |
diff --git a/tools/include/uapi/asm-generic/mman.h b/tools/include/uapi/asm-generic/mman.h index 653687d9771b..36c197fc44a0 100644 --- a/tools/include/uapi/asm-generic/mman.h +++ b/tools/include/uapi/asm-generic/mman.h | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | #ifndef __ASM_GENERIC_MMAN_H | 2 | #ifndef __ASM_GENERIC_MMAN_H |
| 3 | #define __ASM_GENERIC_MMAN_H | 3 | #define __ASM_GENERIC_MMAN_H |
| 4 | 4 | ||
| 5 | #include <asm-generic/mman-common.h> | 5 | #include <asm-generic/mman-common-tools.h> |
| 6 | 6 | ||
| 7 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 7 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
| 8 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | ||
