[PATCH v3] KVM: PPC: Book3S HV: Add missing mappings for tracing exits

Subsystems: kernel virtual machine for powerpc (kvm/powerpc), linux for powerpc (32-bit and 64-bit), the rest

STALE148d REVIEWED: 3 (0M)

3 review trailers.

2 messages, 2 authors, 2026-05-13 · open the first message on its own page

[PATCH v3] KVM: PPC: Book3S HV: Add missing mappings for tracing exits

From: Gautam Menghani <hidden>
Date: 2026-05-12 11:57:56

The macro kvm_trace_symbol_exit is used for providing the mappings
for the trap vectors and their names. Add mappings for H_FAC_UNAVAIL and
RETURN_TO_HOST so that trap reasons are displayed as string instead of
vector numbers when using the kvm_guest_exit tracepoint.

Reviewed-by: Harsh Prateek Bora <redacted>
Reviewed-by: Amit Machhiwal <redacted>
Reviewed-by: Vaibhav Jain (IBM) <redacted>
Signed-off-by: Gautam Menghani <redacted>
---
v2:
1. Remove the trailing comma after last element

v3:
1. Add the mapping for 0x0

 arch/powerpc/kvm/trace_book3s.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/trace_book3s.h b/arch/powerpc/kvm/trace_book3s.h
index 9260ddbd557f..4ee35c6d01aa 100644
--- a/arch/powerpc/kvm/trace_book3s.h
+++ b/arch/powerpc/kvm/trace_book3s.h
@@ -7,6 +7,7 @@
  */
 
 #define kvm_trace_symbol_exit \
+	{0x0, "RETURN_TO_HOST"}, \
 	{0x100, "SYSTEM_RESET"}, \
 	{0x200, "MACHINE_CHECK"}, \
 	{0x300, "DATA_STORAGE"}, \
@@ -28,6 +29,7 @@
 	{0xea0, "H_VIRT"}, \
 	{0xf00, "PERFMON"}, \
 	{0xf20, "ALTIVEC"}, \
-	{0xf40, "VSX"}
+	{0xf40, "VSX"}, \
+	{0xf80, "H_FAC_UNAVAIL"}
 
 #endif
-- 
2.53.0

Re: [PATCH v3] KVM: PPC: Book3S HV: Add missing mappings for tracing exits

From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Date: 2026-05-13 03:57:53

Gautam Menghani [off-list ref] writes:
The macro kvm_trace_symbol_exit is used for providing the mappings
for the trap vectors and their names. Add mappings for H_FAC_UNAVAIL and
RETURN_TO_HOST so that trap reasons are displayed as string instead of
vector numbers when using the kvm_guest_exit tracepoint.
LGTM. Please feel free to add:
Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>

Minor nit: It's generally simpler for everyone to keep the related
patches belonging to a common maintainer tree in one series. For
example, we could have grouped patch [1] with the current patch into one
series to keep them together.

[1]: https://lore.kernel.org/linuxppc-dev/20260511080412.50722-1-Gautam.Menghani@ibm.com/

-ritesh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help