From 4deb5b83b64164264046ef493e76acbefff0b428 Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Tue, 10 Feb 2026 14:50:56 +0000 Subject: [PATCH] x86/traps: Use fatal_trap() for #UD and #GP This renders the diagnostics in a more uniform way. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich (cherry picked from commit 705784e51212cd77031e95ee4ec8799c25e69fb5) --- xen/arch/x86/traps.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index ac063b87d5..85d835ab43 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1376,8 +1376,7 @@ void asmlinkage do_invalid_op(struct cpu_user_regs *regs) if ( likely(extable_fixup(regs, true)) ) return; - show_execution_state(regs); - panic("FATAL TRAP: vector = %d (invalid opcode)\n", X86_EXC_UD); + fatal_trap(regs, false); } void asmlinkage do_int3(struct cpu_user_regs *regs) @@ -1476,8 +1475,7 @@ void do_general_protection(struct cpu_user_regs *regs) return; hardware_gp: - show_execution_state(regs); - panic("GENERAL PROTECTION FAULT\n[error_code=%04x]\n", regs->error_code); + fatal_trap(regs, false); } #ifdef CONFIG_PV