* [PATCH v2] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits
@ 2026-04-28 8:45 Gautam Menghani
2026-05-07 5:24 ` Harsh Prateek Bora
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Gautam Menghani @ 2026-04-28 8:45 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>
---
v2:
1. Remove the trailing comma after last element
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..5d272c115331 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] 5+ messages in thread
* Re: [PATCH v2] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits
2026-04-28 8:45 [PATCH v2] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits Gautam Menghani
@ 2026-05-07 5:24 ` Harsh Prateek Bora
2026-05-07 9:42 ` Amit Machhiwal
2026-05-12 8:36 ` Vaibhav Jain
2 siblings, 0 replies; 5+ messages in thread
From: Harsh Prateek Bora @ 2026-05-07 5:24 UTC (permalink / raw)
To: Gautam Menghani, maddy, npiggin, mpe, chleroy
Cc: Gautam Menghani, linuxppc-dev, kvm, linux-kernel
On 28/04/26 2:15 pm, Gautam Menghani wrote:
> 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>
> ---
> v2:
> 1. Remove the trailing comma after last element
>
> 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..5d272c115331 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"}
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
>
> #endif
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits
2026-04-28 8:45 [PATCH v2] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits Gautam Menghani
2026-05-07 5:24 ` Harsh Prateek Bora
@ 2026-05-07 9:42 ` Amit Machhiwal
2026-05-11 8:19 ` Gautam Menghani
2026-05-12 8:36 ` Vaibhav Jain
2 siblings, 1 reply; 5+ messages in thread
From: Amit Machhiwal @ 2026-05-07 9:42 UTC (permalink / raw)
To: Gautam Menghani
Cc: maddy, npiggin, mpe, chleroy, Gautam Menghani, linuxppc-dev, kvm,
linux-kernel
On 2026/04/28 02:15 PM, Gautam Menghani wrote:
> 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>
> ---
> v2:
> 1. Remove the trailing comma after last element
>
> 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..5d272c115331 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"}
While we are at it, should we also consider adding 0xf60 for Facility
Unavailable? Anyways, LGTM.
Reviewed-by: Amit Machhiwal <amachhiw@linux.ibm.com>
>
> #endif
> --
> 2.52.0
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits
2026-05-07 9:42 ` Amit Machhiwal
@ 2026-05-11 8:19 ` Gautam Menghani
0 siblings, 0 replies; 5+ messages in thread
From: Gautam Menghani @ 2026-05-11 8:19 UTC (permalink / raw)
To: Gautam Menghani, maddy, npiggin, mpe, chleroy, linuxppc-dev, kvm,
linux-kernel
On Thu, May 07, 2026 at 03:12:29PM +0530, Amit Machhiwal wrote:
> On 2026/04/28 02:15 PM, Gautam Menghani wrote:
> > 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>
> > ---
> > v2:
> > 1. Remove the trailing comma after last element
> >
> > 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..5d272c115331 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"}
>
> While we are at it, should we also consider adding 0xf60 for Facility
> Unavailable? Anyways, LGTM.
0xf60 is handled by OS when problem state tries to use a facility which
is not available. So we won't exit to host for this.
Thanks,
Gautam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits
2026-04-28 8:45 [PATCH v2] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits Gautam Menghani
2026-05-07 5:24 ` Harsh Prateek Bora
2026-05-07 9:42 ` Amit Machhiwal
@ 2026-05-12 8:36 ` Vaibhav Jain
2 siblings, 0 replies; 5+ messages in thread
From: Vaibhav Jain @ 2026-05-12 8:36 UTC (permalink / raw)
To: Gautam Menghani, maddy, npiggin, mpe, chleroy
Cc: Gautam Menghani, linuxppc-dev, kvm, linux-kernel
Thanks Gautam catching this and proposing this patch.
Minor review comments below:
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>
> ---
> v2:
> 1. Remove the trailing comma after last element
>
> 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..5d272c115331 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"}
Also add trap of 0x000 indicating "RETURN_TO_HOST"
Also sychronize the contents of the proposed changes for this header with the
libtraceevent header file tools/perf/util/kvm-stat-arch/book3s_hv_exits.h
>
> #endif
> --
> 2.52.0
>
>
With above minor fixes done, feel free to add:
Reviewed-by: Vaibhav Jain (IBM) <vaibhav@linux.ibm.com>
--
Cheers
~ Vaibhav
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-05-12 8:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 8:45 [PATCH v2] KVM: PPC: Book3S HV: Add H_FAC_UNAVAIL mapping for tracing exits Gautam Menghani
2026-05-07 5:24 ` Harsh Prateek Bora
2026-05-07 9:42 ` Amit Machhiwal
2026-05-11 8:19 ` Gautam Menghani
2026-05-12 8:36 ` Vaibhav Jain
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox