xen/arm: traps: Don't panic when receiving an unknown debug trap
authorJulien Grall <jgrall@amazon.com>
Thu, 5 Nov 2020 22:31:06 +0000 (22:31 +0000)
committerHans van Kranenburg <hans@knorrie.org>
Mon, 13 Sep 2021 09:51:21 +0000 (11:51 +0200)
Even if debug trap are only meant for debugging purpose, it is quite
harsh to crash Xen if one of the trap sent by the guest is not handled.

So switch from a panic() to a printk().

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
(cherry picked from commit 957708c2d1ae25d7375abd5e5e70c3043d64f1f1)

xen/arch/arm/traps.c

index 2197df209957ca5faad8a899fd8893568c251c64..22bd1bd4c6c4005bb9ead677ef192479498d8003 100644 (file)
@@ -1411,7 +1411,7 @@ static void do_debug_trap(struct cpu_user_regs *regs, unsigned int code)
         show_execution_state(regs);
         break;
     default:
-        panic("DOM%d: Unhandled debug trap %#x\n", domid, code);
+        printk("DOM%d: Unhandled debug trap %#x\n", domid, code);
         break;
     }
 }