public inbox for linuxppc-dev@ozlabs.org
 help / color / mirror / Atom feed
* [PATCH] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits
@ 2026-04-24  9:25 Gautam Menghani
  2026-04-27  0:30 ` Ritesh Harjani
  0 siblings, 1 reply; 3+ messages in thread
From: Gautam Menghani @ 2026-04-24  9:25 UTC (permalink / raw)
  To: maddy, npiggin, mpe, chleroy
  Cc: Gautam Menghani, linuxppc-dev, kvm, linux-kernel

From: Gautam Menghani <gautam@linux.ibm.com>

The macro kvm_trace_symbol_exit is used for providing the mappings
for the trap vectors and their names. Add mapping for H_FAC_UNAVAIL so that
trap reason is displayed as string instead of a vector number when using
the kvm_guest_exit tracepoint.

Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
---
 arch/powerpc/kvm/trace_book3s.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kvm/trace_book3s.h b/arch/powerpc/kvm/trace_book3s.h
index 9260ddbd557f..eafbaeb5a9db 100644
--- a/arch/powerpc/kvm/trace_book3s.h
+++ b/arch/powerpc/kvm/trace_book3s.h
@@ -28,6 +28,7 @@
 	{0xea0, "H_VIRT"}, \
 	{0xf00, "PERFMON"}, \
 	{0xf20, "ALTIVEC"}, \
-	{0xf40, "VSX"}
+	{0xf40, "VSX"}, \
+	{0xf80, "H_FAC_UNAVAIL"},
 
 #endif
-- 
2.52.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits
  2026-04-24  9:25 [PATCH] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits Gautam Menghani
@ 2026-04-27  0:30 ` Ritesh Harjani
  2026-04-28  8:02   ` Gautam Menghani
  0 siblings, 1 reply; 3+ messages in thread
From: Ritesh Harjani @ 2026-04-27  0:30 UTC (permalink / raw)
  To: Gautam Menghani, maddy, npiggin, mpe, chleroy
  Cc: Gautam Menghani, linuxppc-dev, kvm, linux-kernel

Gautam Menghani <Gautam.Menghani@ibm.com> writes:

> From: Gautam Menghani <gautam@linux.ibm.com>
>
> The macro kvm_trace_symbol_exit is used for providing the mappings
> for the trap vectors and their names. Add mapping for H_FAC_UNAVAIL so that
> trap reason is displayed as string instead of a vector number when using
> the kvm_guest_exit tracepoint.
>
> Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
> ---
>  arch/powerpc/kvm/trace_book3s.h | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/kvm/trace_book3s.h b/arch/powerpc/kvm/trace_book3s.h
> index 9260ddbd557f..eafbaeb5a9db 100644
> --- a/arch/powerpc/kvm/trace_book3s.h
> +++ b/arch/powerpc/kvm/trace_book3s.h
> @@ -28,6 +28,7 @@
>  	{0xea0, "H_VIRT"}, \
>  	{0xf00, "PERFMON"}, \
>  	{0xf20, "ALTIVEC"}, \
> -	{0xf40, "VSX"}
> +	{0xf40, "VSX"}, \
> +	{0xf80, "H_FAC_UNAVAIL"},

So I ended up looking into other trace_symbols too and I don't think we
should have a trailing comma here. It may cause some issues silently in
trace-cmd or other places. I remember going through it when I was doing
some other tracing work earlier but I don't recollect it now.

Can we just remove the trailing comma and send a v2 please?

btw, 0XF80 is correct as per "arch/powerpc/include/asm/kvm_asm.h"

#define BOOK3S_INTERRUPT_H_FAC_UNAVAIL	0xf80

-ritesh



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits
  2026-04-27  0:30 ` Ritesh Harjani
@ 2026-04-28  8:02   ` Gautam Menghani
  0 siblings, 0 replies; 3+ messages in thread
From: Gautam Menghani @ 2026-04-28  8:02 UTC (permalink / raw)
  To: Ritesh Harjani
  Cc: Gautam Menghani, maddy, npiggin, mpe, chleroy, linuxppc-dev, kvm,
	linux-kernel

On Mon, Apr 27, 2026 at 06:00:46AM +0530, Ritesh Harjani wrote:
> Gautam Menghani <Gautam.Menghani@ibm.com> writes:
> 
> > From: Gautam Menghani <gautam@linux.ibm.com>
> >
> > The macro kvm_trace_symbol_exit is used for providing the mappings
> > for the trap vectors and their names. Add mapping for H_FAC_UNAVAIL so that
> > trap reason is displayed as string instead of a vector number when using
> > the kvm_guest_exit tracepoint.
> >
> > Signed-off-by: Gautam Menghani <gautam@linux.ibm.com>
> > ---
> >  arch/powerpc/kvm/trace_book3s.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/powerpc/kvm/trace_book3s.h b/arch/powerpc/kvm/trace_book3s.h
> > index 9260ddbd557f..eafbaeb5a9db 100644
> > --- a/arch/powerpc/kvm/trace_book3s.h
> > +++ b/arch/powerpc/kvm/trace_book3s.h
> > @@ -28,6 +28,7 @@
> >  	{0xea0, "H_VIRT"}, \
> >  	{0xf00, "PERFMON"}, \
> >  	{0xf20, "ALTIVEC"}, \
> > -	{0xf40, "VSX"}
> > +	{0xf40, "VSX"}, \
> > +	{0xf80, "H_FAC_UNAVAIL"},
> 
> So I ended up looking into other trace_symbols too and I don't think we
> should have a trailing comma here. It may cause some issues silently in
> trace-cmd or other places. I remember going through it when I was doing
> some other tracing work earlier but I don't recollect it now.
> 
> Can we just remove the trailing comma and send a v2 please?

Good catch, thanks. Will send a v2


> 
> btw, 0XF80 is correct as per "arch/powerpc/include/asm/kvm_asm.h"
> 
> #define BOOK3S_INTERRUPT_H_FAC_UNAVAIL	0xf80
> 
> -ritesh
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-28  8:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-24  9:25 [PATCH] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits Gautam Menghani
2026-04-27  0:30 ` Ritesh Harjani
2026-04-28  8:02   ` Gautam Menghani

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox