All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/arm: Panic when we receive an unexpected trap
@ 2014-06-17 20:44 Julien Grall
  2014-06-18 16:02 ` Ian Campbell
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Grall @ 2014-06-17 20:44 UTC (permalink / raw)
  To: xen-devel; +Cc: stefano.stabellini, Julien Grall, tim, ian.campbell

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.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
 xen/arch/arm/traps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
index ac3fc70..0abb6ff 100644
--- a/xen/arch/arm/traps.c
+++ b/xen/arch/arm/traps.c
@@ -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)(
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xen/arm: Panic when we receive an unexpected trap
  2014-06-17 20:44 [PATCH] xen/arm: Panic when we receive an unexpected trap Julien Grall
@ 2014-06-18 16:02 ` Ian Campbell
  2014-06-18 16:08   ` Julien Grall
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2014-06-18 16:02 UTC (permalink / raw)
  To: Julien Grall; +Cc: xen-devel, tim, stefano.stabellini

On Tue, 2014-06-17 at 21:44 +0100, Julien Grall wrote:
> 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.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>

Ack + applied.

> ---
>  xen/arch/arm/traps.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
> index ac3fc70..0abb6ff 100644
> --- a/xen/arch/arm/traps.c
> +++ b/xen/arch/arm/traps.c
> @@ -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)(

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xen/arm: Panic when we receive an unexpected trap
  2014-06-18 16:02 ` Ian Campbell
@ 2014-06-18 16:08   ` Julien Grall
  2014-06-18 16:41     ` Ian Campbell
  0 siblings, 1 reply; 4+ messages in thread
From: Julien Grall @ 2014-06-18 16:08 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel, tim, stefano.stabellini

On 06/18/2014 05:02 PM, Ian Campbell wrote:
> On Tue, 2014-06-17 at 21:44 +0100, Julien Grall wrote:
>> 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.
>>
>> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> 
> 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,

-- 
Julien Grall

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xen/arm: Panic when we receive an unexpected trap
  2014-06-18 16:08   ` Julien Grall
@ 2014-06-18 16:41     ` Ian Campbell
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2014-06-18 16:41 UTC (permalink / raw)
  To: Julien Grall; +Cc: xen-devel, tim, stefano.stabellini

On Wed, 2014-06-18 at 17:08 +0100, Julien Grall wrote:
> On 06/18/2014 05:02 PM, Ian Campbell wrote:
> > On Tue, 2014-06-17 at 21:44 +0100, Julien Grall wrote:
> >> 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.
> >>
> >> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> > 
> > Ack + applied.
> 
> Thanks, I think this patch is a good candidate for backporting on Xen 4.4

Noted.

> 
> It will avoid Xen to try to continue running when an unexpected trap occurs.
> 
> Regards,
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-18 16:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-17 20:44 [PATCH] xen/arm: Panic when we receive an unexpected trap Julien Grall
2014-06-18 16:02 ` Ian Campbell
2014-06-18 16:08   ` Julien Grall
2014-06-18 16:41     ` Ian Campbell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.