[PATCH 1/2] tools headers: Remove unused kvm_perf.h copies

James Clark posted 2 patches 5 months ago
[PATCH 1/2] tools headers: Remove unused kvm_perf.h copies
Posted by James Clark 5 months ago
These have been unused since commit 162607ea20fa ("perf kvm/{x86,s390}:
Remove dependency on uapi/kvm_perf.h") in favour of dynamic discovery.
Remove the unused headers to reduce consistency checking overhead and
noise.

Signed-off-by: James Clark <james.clark@linaro.org>
---
 tools/arch/s390/include/uapi/asm/kvm_perf.h | 22 ----------------------
 tools/arch/x86/include/uapi/asm/kvm_perf.h  | 17 -----------------
 tools/perf/check-headers.sh                 |  2 --
 3 files changed, 41 deletions(-)

diff --git a/tools/arch/s390/include/uapi/asm/kvm_perf.h b/tools/arch/s390/include/uapi/asm/kvm_perf.h
deleted file mode 100644
index 84606b8cc49e4..0000000000000
--- a/tools/arch/s390/include/uapi/asm/kvm_perf.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-/*
- * Definitions for perf-kvm on s390
- *
- * Copyright 2014 IBM Corp.
- * Author(s): Alexander Yarygin <yarygin@linux.vnet.ibm.com>
- */
-
-#ifndef __LINUX_KVM_PERF_S390_H
-#define __LINUX_KVM_PERF_S390_H
-
-#include <asm/sie.h>
-
-#define DECODE_STR_LEN 40
-
-#define VCPU_ID "id"
-
-#define KVM_ENTRY_TRACE "kvm:kvm_s390_sie_enter"
-#define KVM_EXIT_TRACE "kvm:kvm_s390_sie_exit"
-#define KVM_EXIT_REASON "icptcode"
-
-#endif
diff --git a/tools/arch/x86/include/uapi/asm/kvm_perf.h b/tools/arch/x86/include/uapi/asm/kvm_perf.h
deleted file mode 100644
index 125cf5cdf6c5f..0000000000000
--- a/tools/arch/x86/include/uapi/asm/kvm_perf.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
-#ifndef _ASM_X86_KVM_PERF_H
-#define _ASM_X86_KVM_PERF_H
-
-#include <asm/svm.h>
-#include <asm/vmx.h>
-#include <asm/kvm.h>
-
-#define DECODE_STR_LEN 20
-
-#define VCPU_ID "vcpu_id"
-
-#define KVM_ENTRY_TRACE "kvm:kvm_entry"
-#define KVM_EXIT_TRACE "kvm:kvm_exit"
-#define KVM_EXIT_REASON "exit_reason"
-
-#endif /* _ASM_X86_KVM_PERF_H */
diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index be519c433ce47..6eacc02fbb1b3 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -40,13 +40,11 @@ declare -a FILES=(
   "arch/s390/include/uapi/asm/perf_regs.h"
   "arch/x86/include/uapi/asm/perf_regs.h"
   "arch/x86/include/uapi/asm/kvm.h"
-  "arch/x86/include/uapi/asm/kvm_perf.h"
   "arch/x86/include/uapi/asm/svm.h"
   "arch/x86/include/uapi/asm/unistd.h"
   "arch/x86/include/uapi/asm/vmx.h"
   "arch/powerpc/include/uapi/asm/kvm.h"
   "arch/s390/include/uapi/asm/kvm.h"
-  "arch/s390/include/uapi/asm/kvm_perf.h"
   "arch/s390/include/uapi/asm/sie.h"
   "arch/arm/include/uapi/asm/kvm.h"
   "arch/arm64/include/uapi/asm/kvm.h"

-- 
2.34.1
Re: [PATCH 1/2] tools headers: Remove unused kvm_perf.h copies
Posted by Mi, Dapeng 4 months ago
On 9/10/2025 9:30 PM, James Clark wrote:
> These have been unused since commit 162607ea20fa ("perf kvm/{x86,s390}:
> Remove dependency on uapi/kvm_perf.h") in favour of dynamic discovery.
> Remove the unused headers to reduce consistency checking overhead and
> noise.
>
> Signed-off-by: James Clark <james.clark@linaro.org>
> ---
>  tools/arch/s390/include/uapi/asm/kvm_perf.h | 22 ----------------------
>  tools/arch/x86/include/uapi/asm/kvm_perf.h  | 17 -----------------
>  tools/perf/check-headers.sh                 |  2 --
>  3 files changed, 41 deletions(-)
>
> diff --git a/tools/arch/s390/include/uapi/asm/kvm_perf.h b/tools/arch/s390/include/uapi/asm/kvm_perf.h
> deleted file mode 100644
> index 84606b8cc49e4..0000000000000
> --- a/tools/arch/s390/include/uapi/asm/kvm_perf.h
> +++ /dev/null
> @@ -1,22 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> -/*
> - * Definitions for perf-kvm on s390
> - *
> - * Copyright 2014 IBM Corp.
> - * Author(s): Alexander Yarygin <yarygin@linux.vnet.ibm.com>
> - */
> -
> -#ifndef __LINUX_KVM_PERF_S390_H
> -#define __LINUX_KVM_PERF_S390_H
> -
> -#include <asm/sie.h>
> -
> -#define DECODE_STR_LEN 40
> -
> -#define VCPU_ID "id"
> -
> -#define KVM_ENTRY_TRACE "kvm:kvm_s390_sie_enter"
> -#define KVM_EXIT_TRACE "kvm:kvm_s390_sie_exit"
> -#define KVM_EXIT_REASON "icptcode"
> -
> -#endif
> diff --git a/tools/arch/x86/include/uapi/asm/kvm_perf.h b/tools/arch/x86/include/uapi/asm/kvm_perf.h
> deleted file mode 100644
> index 125cf5cdf6c5f..0000000000000
> --- a/tools/arch/x86/include/uapi/asm/kvm_perf.h
> +++ /dev/null
> @@ -1,17 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> -#ifndef _ASM_X86_KVM_PERF_H
> -#define _ASM_X86_KVM_PERF_H
> -
> -#include <asm/svm.h>
> -#include <asm/vmx.h>
> -#include <asm/kvm.h>
> -
> -#define DECODE_STR_LEN 20
> -
> -#define VCPU_ID "vcpu_id"
> -
> -#define KVM_ENTRY_TRACE "kvm:kvm_entry"
> -#define KVM_EXIT_TRACE "kvm:kvm_exit"
> -#define KVM_EXIT_REASON "exit_reason"
> -
> -#endif /* _ASM_X86_KVM_PERF_H */
> diff --git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
> index be519c433ce47..6eacc02fbb1b3 100755
> --- a/tools/perf/check-headers.sh
> +++ b/tools/perf/check-headers.sh
> @@ -40,13 +40,11 @@ declare -a FILES=(
>    "arch/s390/include/uapi/asm/perf_regs.h"
>    "arch/x86/include/uapi/asm/perf_regs.h"
>    "arch/x86/include/uapi/asm/kvm.h"
> -  "arch/x86/include/uapi/asm/kvm_perf.h"
>    "arch/x86/include/uapi/asm/svm.h"
>    "arch/x86/include/uapi/asm/unistd.h"
>    "arch/x86/include/uapi/asm/vmx.h"
>    "arch/powerpc/include/uapi/asm/kvm.h"
>    "arch/s390/include/uapi/asm/kvm.h"
> -  "arch/s390/include/uapi/asm/kvm_perf.h"
>    "arch/s390/include/uapi/asm/sie.h"
>    "arch/arm/include/uapi/asm/kvm.h"
>    "arch/arm64/include/uapi/asm/kvm.h"

Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>