Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf kvm stat: Fix build error

Since commit ceea279f9376 ("perf kvm stat: Remove use of the arch
directory"), a native build on Arm64 machine reports:

util/kvm-stat-arch/kvm-stat-x86.c:7:10: fatal error: asm/svm.h: No such file or directory
7 | #include <asm/svm.h>
| ^~~~~~~~~~~
compilation terminated.

The build fails to find x86's asm headers when building for Arm64. Fix
this by including asm headers with relative path instead.

Fixes: ceea279f9376 ("perf kvm stat: Remove use of the arch directory")
Signed-off-by: Leo Yan <leo.yan@arm.com>
Link: https://lore.kernel.org/r/20260206-perf_fix_kvm_stat_error-v1-1-ad40115876be@arm.com
Cc: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: James Clark <james.clark@linaro.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-perf-users@vger.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Leo Yan and committed by
Arnaldo Carvalho de Melo
a724a8fc e5e66adf

+3 -3
+3 -3
tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
··· 4 4 #include "../kvm-stat.h" 5 5 #include "../evsel.h" 6 6 #include "../env.h" 7 - #include <asm/svm.h> 8 - #include <asm/vmx.h> 9 - #include <asm/kvm.h> 7 + #include "../../arch/x86/include/uapi/asm/svm.h" 8 + #include "../../arch/x86/include/uapi/asm/vmx.h" 9 + #include "../../arch/x86/include/uapi/asm/kvm.h" 10 10 #include <subcmd/parse-options.h> 11 11 12 12 define_exit_reasons_table(vmx_exit_reasons, VMX_EXIT_REASONS);