All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Gautam Menghani" <gautam@linux.ibm.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf kvm stat: Update the exit reason mappings
Date: Wed, 13 May 2026 20:55:48 +0000	[thread overview]
Message-ID: <20260513205548.ED260C19425@smtp.kernel.org> (raw)
In-Reply-To: <20260512120408.59332-1-gautam@linux.ibm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The patch adds `H_FAC_UNAVAIL` to the exit reason mappings, but this mapping is missing from `trace_book3s.h`, contradicting the commit message.
--

commit ece070bf3559f07c600d918f34f26871f45c741d
Author: Gautam Menghani <gautam@linux.ibm.com>

perf kvm stat: Update the exit reason mappings

This commit updates the exit reason mappings in perf to sync them with
the definitions in trace_book3s.h.

> diff --git a/tools/perf/util/kvm-stat-arch/book3s_hv_exits.h b/tools/perf/util/kvm-stat-arch/book3s_hv_exits.h
> index 2011376c7ab58..2688ca7d03990 100644
> --- a/tools/perf/util/kvm-stat-arch/book3s_hv_exits.h
> +++ b/tools/perf/util/kvm-stat-arch/book3s_hv_exits.h
> @@ -26,8 +26,10 @@
>  	{0xe00, "H_DATA_STORAGE"}, \
>  	{0xe20, "H_INST_STORAGE"}, \
>  	{0xe40, "H_EMUL_ASSIST"}, \
> +	{0xea0, "H_VIRT"}, \
>  	{0xf00, "PERFMON"}, \
>  	{0xf20, "ALTIVEC"}, \
> -	{0xf40, "VSX"}
> +	{0xf40, "VSX"}, \
> +	{0xf80, "H_FAC_UNAVAIL"}

The commit message states "Sync the exit reason mappings with the mappings
in trace_book3s.h".

Is this description accurate? Looking at arch/powerpc/kvm/trace_book3s.h,
it does not contain the mapping for H_FAC_UNAVAIL (0xf80):

arch/powerpc/kvm/trace_book3s.h:
#define kvm_trace_symbol_exit \
...
	{0xea0, "H_VIRT"}, \
	{0xf00, "PERFMON"}, \
	{0xf20, "ALTIVEC"}, \
	{0xf40, "VSX"}

Because trace_book3s.h lacks H_FAC_UNAVAIL, the ftrace kvm_guest_exit
tracepoint and perf kvm stat remain out of sync, as ftrace will display
the raw vector while perf will decode it.

Should trace_book3s.h also be updated to ensure they are truly synchronized?

Additionally, several other common KVM exits defined in kvm_asm.h, such as
HMI (0xe60) and H_DOORBELL (0xe80), appear to be missing from both headers.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260512120408.59332-1-gautam@linux.ibm.com?part=1

      parent reply	other threads:[~2026-05-13 20:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 12:04 [PATCH] perf kvm stat: Update the exit reason mappings Gautam Menghani
2026-05-12 15:25 ` Ian Rogers
2026-05-12 16:18   ` Gautam Menghani
2026-05-13  4:03     ` Ritesh Harjani
2026-05-13 20:55 ` sashiko-bot [this message]

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=20260513205548.ED260C19425@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=gautam@linux.ibm.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.