xen/arm: Panic when we receive an unexpected trap
PATCH 1/1 xen/arm: Panic when we receive an unexpected trap
The current implementation of do_unexpected_trap make Xen spin forever on the current physical CPU. This may lead to stall guests VCPU and print unhelpful message (RCU stall...).
Usually when Xen receives an unexpected trap, it means that something goes wrong either in the hypervisor or in the CPU. In this case we should directly panic to also stop the other CPUs.
--- xen/arch/arm/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/arm/traps.c +1 -1
@@ -999,7 +999,7 @@ void do_unexpected_trap(const char *msg, struct cpu_user_regs *regs) {printk ("CPU%d: Unexpected Trap: %s\n" ,smp_processor_id (), msg);show_execution_state (regs); -while (1 ); +panic ("CPU%d: Unexpected Trap: %s\n" ,smp_processor_id (), msg); } typedef register_t (*arm_hypercall_fn_t)(
Signature · 1 line
1.7.10.4
Quoted 9 lines · Julien Grall
The current implementation of
do_unexpected_trapmake Xen spin forever on the current physical CPU. This may lead to stall guests VCPU and print unhelpful message (RCU stall...).Usually when Xen receives an unexpected trap, it means that something goes wrong either in the hypervisor or in the CPU. In this case we should directly panic to also stop the other CPUs.
Signed-off-by Julien Grall <[email protected]>
Ack + applied.
Quoted 17 lines
--- xen/arch/arm/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/arch/arm/traps.c +1
-1@@ -999,7 +999,7 @@ void do_unexpected_trap(const char *msg, struct cpu_user_regs *regs) {printk ("CPU%d: Unexpected Trap: %s\n" ,smp_processor_id (), msg);show_execution_state (regs); -while (1 ); +panic ("CPU%d: Unexpected Trap: %s\n" ,smp_processor_id (), msg); } typedef register_t (*arm_hypercall_fn_t)(
Quoted 5 lines · Ian Campbell
Quoted 4 lines · Julien Grall
The current implementation of
do_unexpected_trapmake Xen spin forever on the current physical CPU. This may lead to stall guests VCPU and print unhelpful message (RCU stall...).
Quoted 7 lines
Quoted 5 lines
Usually when Xen receives an unexpected trap, it means that something goes wrong either in the hypervisor or in the CPU. In this case we should directly panic to also stop the other CPUs.
Signed-off-by Julien Grall <[email protected]>Ack + applied.
Thanks, I think this patch is a good candidate for backporting on Xen 4.4
It will avoid Xen to try to continue running when an unexpected trap occurs.
Regards,
Signature · 1 line
Julien Grall
Quoted 10 lines · Julien Grall
Quoted 9 lines · Ian Campbell
Quoted 8 lines · Julien Grall
The current implementation of
do_unexpected_trapmake Xen spin forever on the current physical CPU. This may lead to stall guests VCPU and print unhelpful message (RCU stall...).Usually when Xen receives an unexpected trap, it means that something goes wrong either in the hypervisor or in the CPU. In this case we should directly panic to also stop the other CPUs.
Quoted 5 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Julien Grall <[email protected]>Ack + applied.
Thanks, I think this patch is a good candidate for backporting on Xen 4.4
Noted.
Quoted 5 lines
It will avoid Xen to try to continue running when an unexpected trap occurs.
Regards,