From: Namhyung Kim <namhyung@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Leo Yan <leo.yan@arm.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf kvm stat: Fix build error
Date: Wed, 25 Feb 2026 17:56:49 -0800 [thread overview]
Message-ID: <aZ-oYb-FDLVT5MGq@google.com> (raw)
In-Reply-To: <20260206-perf_fix_kvm_stat_error-v1-1-ad40115876be@arm.com>
Hi Ian,
On Fri, Feb 06, 2026 at 11:00:20AM +0000, Leo Yan wrote:
> 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>
Probably not from this patch, but this change seems to introduce this
error on my i386.
In file included from util/kvm-stat-arch/kvm-stat-x86.c:4:
/linux/tools/include/../../arch/x86/include/uapi/asm/svm.h:137:32: error: conversion from 'long long unsigned int' to 'long unsigned int' changes value from '18446744073709551615' to '4294967295' [-Werror=overflow]
137 | #define SVM_EXIT_ERR -1ull
| ^
util/kvm-stat-arch/kvm-stat-x86.c:13:1: note: in expansion of macro 'define_exit_reasons_table'
13 | define_exit_reasons_table(svm_exit_reasons, SVM_EXIT_REASONS);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/linux/tools/include/../../arch/x86/include/uapi/asm/svm.h:249:11: note: in expansion of macro 'SVM_EXIT_ERR'
249 | { SVM_EXIT_ERR, "invalid_guest_state" }
| ^~~~~~~~~~~~
util/kvm-stat-arch/kvm-stat-x86.c:13:45: note: in expansion of macro 'SVM_EXIT_REASONS'
13 | define_exit_reasons_table(svm_exit_reasons, SVM_EXIT_REASONS);
| ^~~~~~~~~~~~~~~~
Thanks,
Namhyung
> ---
> tools/perf/util/kvm-stat-arch/kvm-stat-x86.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/util/kvm-stat-arch/kvm-stat-x86.c b/tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
> index 1cf541385a4bdee4930b67a054906ccade7301fd..43275d25b6cbccc477ba45a901d69c67422847ae 100644
> --- a/tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
> +++ b/tools/perf/util/kvm-stat-arch/kvm-stat-x86.c
> @@ -4,9 +4,9 @@
> #include "../kvm-stat.h"
> #include "../evsel.h"
> #include "../env.h"
> -#include <asm/svm.h>
> -#include <asm/vmx.h>
> -#include <asm/kvm.h>
> +#include "../../arch/x86/include/uapi/asm/svm.h"
> +#include "../../arch/x86/include/uapi/asm/vmx.h"
> +#include "../../arch/x86/include/uapi/asm/kvm.h"
> #include <subcmd/parse-options.h>
>
> define_exit_reasons_table(vmx_exit_reasons, VMX_EXIT_REASONS);
>
> ---
> base-commit: 84cb36da81413c2dff805150b9f4db1524460269
> change-id: 20260206-perf_fix_kvm_stat_error-a795a1dd67a2
>
> Best regards,
> --
> Leo Yan <leo.yan@arm.com>
>
next prev parent reply other threads:[~2026-02-26 1:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 11:00 [PATCH] perf kvm stat: Fix build error Leo Yan
2026-02-26 1:56 ` Namhyung Kim [this message]
2026-02-26 6:36 ` Ian Rogers
2026-02-26 9:52 ` Leo Yan
2026-02-26 16:44 ` Ian Rogers
2026-02-27 7:32 ` Namhyung Kim
2026-02-27 17:30 ` Ian Rogers
2026-03-01 17:45 ` Leo Yan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aZ-oYb-FDLVT5MGq@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=leo.yan@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox