xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen: fix hypervisor crash with xentrace
@ 2011-04-06 14:32 Christoph Egger
  2011-04-06 14:36 ` Christoph Egger
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Christoph Egger @ 2011-04-06 14:32 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 1944 bytes --]


Hi,

Attached patch fixes hypervisor crashes when xentrace buffer gets initialized.

The xen backtraces I have seen are:

(XEN) Xen call trace:
(XEN)    [<ffff82c48025cf70>] early_stack+0x0/0x48
(XEN)    [<ffff82c4801278d0>] tb_control+0x182/0x278
(XEN)    [<ffff82c480124aac>] do_sysctl+0x1fc/0xa40
(XEN)    [<ffff82c480213248>] syscall_enter+0xc8/0x122
(XEN)
(XEN) Pagetable walk from ffff82c48025cf70:
(XEN)  L4[0x105] = 00000000cfcaa027 5555555555555555
(XEN)  L3[0x112] = 00000000cfcab027 5555555555555555
(XEN)  L2[0x001] = 000000022f27b063 5555555555555555
(XEN)  L1[0x05c] = 00000000cfc5c262 5555555555555555
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 0:
(XEN) FATAL PAGE FAULT
(XEN) [error_code=0010]
(XEN) Faulting linear address: ffff82c48025cf70
(XEN) ****************************************


(XEN) Xen call trace:
(XEN)    [<ffff82c48025d852>] notifier_chain_register+0x0/0x35
(XEN)    [<ffff82c4801275b2>] alloc_trace_bufs+0x5cd/0x7a9
(XEN)    [<ffff82c480127910>] tb_control+0x182/0x278
(XEN)    [<ffff82c480124aec>] do_sysctl+0x1fc/0xa40
(XEN)    [<ffff82c480213288>] syscall_enter+0xc8/0x122
(XEN)
(XEN) Pagetable walk from ffff82c48025d852:
(XEN)  L4[0x105] = 00000000cfcaa027 5555555555555555
(XEN)  L3[0x112] = 00000000cfcab027 5555555555555555
(XEN)  L2[0x001] = 000000022f27b063 5555555555555555
(XEN)  L1[0x05d] = 00000000cfc5d262 5555555555555555
(XEN)
(XEN) ****************************************
(XEN) Panic on CPU 1:
(XEN) FATAL PAGE FAULT
(XEN) [error_code=0010]
(XEN) Faulting linear address: ffff82c48025d852
(XEN) ****************************************


Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

[-- Attachment #2: xen_xentrace.diff --]
[-- Type: text/x-diff, Size: 927 bytes --]

diff -r 3fd604b77a5e xen/common/cpu.c
--- a/xen/common/cpu.c	Wed Apr 06 16:03:15 2011 +0200
+++ b/xen/common/cpu.c	Wed Apr 06 16:27:42 2011 +0200
@@ -54,7 +54,7 @@ void cpu_hotplug_done(void)
 
 static NOTIFIER_HEAD(cpu_chain);
 
-void __init register_cpu_notifier(struct notifier_block *nb)
+void register_cpu_notifier(struct notifier_block *nb)
 {
     if ( !spin_trylock(&cpu_add_remove_lock) )
         BUG(); /* Should never fail as we are called only during boot. */
diff -r 3fd604b77a5e xen/common/notifier.c
--- a/xen/common/notifier.c	Wed Apr 06 16:03:15 2011 +0200
+++ b/xen/common/notifier.c	Wed Apr 06 16:27:42 2011 +0200
@@ -19,7 +19,7 @@
  * Adds a notifier to a raw notifier chain.
  * All locking must be provided by the caller.
  */
-void __init notifier_chain_register(
+void notifier_chain_register(
     struct notifier_head *nh, struct notifier_block *n)
 {
     struct list_head *chain = &nh->head.chain;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

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

* Re: [PATCH] xen: fix hypervisor crash with xentrace
  2011-04-06 14:32 [PATCH] xen: fix hypervisor crash with xentrace Christoph Egger
@ 2011-04-06 14:36 ` Christoph Egger
  2011-04-06 15:01   ` Jan Beulich
  2011-04-06 14:54 ` Keir Fraser
  2011-04-06 15:03 ` Jan Beulich
  2 siblings, 1 reply; 5+ messages in thread
From: Christoph Egger @ 2011-04-06 14:36 UTC (permalink / raw)
  To: xen-devel

On 04/06/11 16:32, Christoph Egger wrote:
>
> Hi,
>
> Attached patch fixes hypervisor crashes when xentrace buffer gets initialized.

Forgot to mention this regression was introduced in c/s 
23134:f5d33782a57b by Jan Beulich.

>
> The xen backtraces I have seen are:
>
> (XEN) Xen call trace:
> (XEN)    [<ffff82c48025cf70>] early_stack+0x0/0x48
> (XEN)    [<ffff82c4801278d0>] tb_control+0x182/0x278
> (XEN)    [<ffff82c480124aac>] do_sysctl+0x1fc/0xa40
> (XEN)    [<ffff82c480213248>] syscall_enter+0xc8/0x122
> (XEN)
> (XEN) Pagetable walk from ffff82c48025cf70:
> (XEN)  L4[0x105] = 00000000cfcaa027 5555555555555555
> (XEN)  L3[0x112] = 00000000cfcab027 5555555555555555
> (XEN)  L2[0x001] = 000000022f27b063 5555555555555555
> (XEN)  L1[0x05c] = 00000000cfc5c262 5555555555555555
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) FATAL PAGE FAULT
> (XEN) [error_code=0010]
> (XEN) Faulting linear address: ffff82c48025cf70
> (XEN) ****************************************
>
>
> (XEN) Xen call trace:
> (XEN)    [<ffff82c48025d852>] notifier_chain_register+0x0/0x35
> (XEN)    [<ffff82c4801275b2>] alloc_trace_bufs+0x5cd/0x7a9
> (XEN)    [<ffff82c480127910>] tb_control+0x182/0x278
> (XEN)    [<ffff82c480124aec>] do_sysctl+0x1fc/0xa40
> (XEN)    [<ffff82c480213288>] syscall_enter+0xc8/0x122
> (XEN)
> (XEN) Pagetable walk from ffff82c48025d852:
> (XEN)  L4[0x105] = 00000000cfcaa027 5555555555555555
> (XEN)  L3[0x112] = 00000000cfcab027 5555555555555555
> (XEN)  L2[0x001] = 000000022f27b063 5555555555555555
> (XEN)  L1[0x05d] = 00000000cfc5d262 5555555555555555
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 1:
> (XEN) FATAL PAGE FAULT
> (XEN) [error_code=0010]
> (XEN) Faulting linear address: ffff82c48025d852
> (XEN) ****************************************
>
>
> Signed-off-by: Christoph Egger<Christoph.Egger@amd.com>
>
>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

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

* Re: [PATCH] xen: fix hypervisor crash with xentrace
  2011-04-06 14:32 [PATCH] xen: fix hypervisor crash with xentrace Christoph Egger
  2011-04-06 14:36 ` Christoph Egger
@ 2011-04-06 14:54 ` Keir Fraser
  2011-04-06 15:03 ` Jan Beulich
  2 siblings, 0 replies; 5+ messages in thread
From: Keir Fraser @ 2011-04-06 14:54 UTC (permalink / raw)
  To: Christoph Egger, xen-devel

On 06/04/2011 15:32, "Christoph Egger" <Christoph.Egger@amd.com> wrote:

> 
> Hi,
> 
> Attached patch fixes hypervisor crashes when xentrace buffer gets initialized.

Should be fixed by c/s 23173. Thanks!

 -- Keir

> The xen backtraces I have seen are:
> 
> (XEN) Xen call trace:
> (XEN)    [<ffff82c48025cf70>] early_stack+0x0/0x48
> (XEN)    [<ffff82c4801278d0>] tb_control+0x182/0x278
> (XEN)    [<ffff82c480124aac>] do_sysctl+0x1fc/0xa40
> (XEN)    [<ffff82c480213248>] syscall_enter+0xc8/0x122
> (XEN)
> (XEN) Pagetable walk from ffff82c48025cf70:
> (XEN)  L4[0x105] = 00000000cfcaa027 5555555555555555
> (XEN)  L3[0x112] = 00000000cfcab027 5555555555555555
> (XEN)  L2[0x001] = 000000022f27b063 5555555555555555
> (XEN)  L1[0x05c] = 00000000cfc5c262 5555555555555555
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) FATAL PAGE FAULT
> (XEN) [error_code=0010]
> (XEN) Faulting linear address: ffff82c48025cf70
> (XEN) ****************************************
> 
> 
> (XEN) Xen call trace:
> (XEN)    [<ffff82c48025d852>] notifier_chain_register+0x0/0x35
> (XEN)    [<ffff82c4801275b2>] alloc_trace_bufs+0x5cd/0x7a9
> (XEN)    [<ffff82c480127910>] tb_control+0x182/0x278
> (XEN)    [<ffff82c480124aec>] do_sysctl+0x1fc/0xa40
> (XEN)    [<ffff82c480213288>] syscall_enter+0xc8/0x122
> (XEN)
> (XEN) Pagetable walk from ffff82c48025d852:
> (XEN)  L4[0x105] = 00000000cfcaa027 5555555555555555
> (XEN)  L3[0x112] = 00000000cfcab027 5555555555555555
> (XEN)  L2[0x001] = 000000022f27b063 5555555555555555
> (XEN)  L1[0x05d] = 00000000cfc5d262 5555555555555555
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 1:
> (XEN) FATAL PAGE FAULT
> (XEN) [error_code=0010]
> (XEN) Faulting linear address: ffff82c48025d852
> (XEN) ****************************************
> 
> 
> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
> 

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

* Re: [PATCH] xen: fix hypervisor crash with xentrace
  2011-04-06 14:36 ` Christoph Egger
@ 2011-04-06 15:01   ` Jan Beulich
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2011-04-06 15:01 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel

>>> On 06.04.11 at 16:36, Christoph Egger <Christoph.Egger@amd.com> wrote:
> On 04/06/11 16:32, Christoph Egger wrote:
>>
>> Hi,
>>
>> Attached patch fixes hypervisor crashes when xentrace buffer gets 
> initialized.
> 
> Forgot to mention this regression was introduced in c/s 
> 23134:f5d33782a57b by Jan Beulich.

But just removing the __init-s isn't the right way to fix this (Did
you notice the comment in register_cpu_notifier(), which I also
pointed out in the changeset description). Apparently I overlooked
a call to register_cpu_notifier(), and it's that which ought to get
moved into an __init function.

Jan

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

* Re: [PATCH] xen: fix hypervisor crash with xentrace
  2011-04-06 14:32 [PATCH] xen: fix hypervisor crash with xentrace Christoph Egger
  2011-04-06 14:36 ` Christoph Egger
  2011-04-06 14:54 ` Keir Fraser
@ 2011-04-06 15:03 ` Jan Beulich
  2 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2011-04-06 15:03 UTC (permalink / raw)
  To: Christoph Egger; +Cc: xen-devel, Keir Fraser

>>> On 06.04.11 at 16:32, Christoph Egger <Christoph.Egger@amd.com> wrote:
> Attached patch fixes hypervisor crashes when xentrace buffer gets 
> initialized.

Just saw that Keir already fixed this the proper way as c/s
23173:94cef9aaf0cd. Thanks, Keir!

Jan

> The xen backtraces I have seen are:
> 
> (XEN) Xen call trace:
> (XEN)    [<ffff82c48025cf70>] early_stack+0x0/0x48
> (XEN)    [<ffff82c4801278d0>] tb_control+0x182/0x278
> (XEN)    [<ffff82c480124aac>] do_sysctl+0x1fc/0xa40
> (XEN)    [<ffff82c480213248>] syscall_enter+0xc8/0x122
> (XEN)
> (XEN) Pagetable walk from ffff82c48025cf70:
> (XEN)  L4[0x105] = 00000000cfcaa027 5555555555555555
> (XEN)  L3[0x112] = 00000000cfcab027 5555555555555555
> (XEN)  L2[0x001] = 000000022f27b063 5555555555555555
> (XEN)  L1[0x05c] = 00000000cfc5c262 5555555555555555
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 0:
> (XEN) FATAL PAGE FAULT
> (XEN) [error_code=0010]
> (XEN) Faulting linear address: ffff82c48025cf70
> (XEN) ****************************************
> 
> 
> (XEN) Xen call trace:
> (XEN)    [<ffff82c48025d852>] notifier_chain_register+0x0/0x35
> (XEN)    [<ffff82c4801275b2>] alloc_trace_bufs+0x5cd/0x7a9
> (XEN)    [<ffff82c480127910>] tb_control+0x182/0x278
> (XEN)    [<ffff82c480124aec>] do_sysctl+0x1fc/0xa40
> (XEN)    [<ffff82c480213288>] syscall_enter+0xc8/0x122
> (XEN)
> (XEN) Pagetable walk from ffff82c48025d852:
> (XEN)  L4[0x105] = 00000000cfcaa027 5555555555555555
> (XEN)  L3[0x112] = 00000000cfcab027 5555555555555555
> (XEN)  L2[0x001] = 000000022f27b063 5555555555555555
> (XEN)  L1[0x05d] = 00000000cfc5d262 5555555555555555
> (XEN)
> (XEN) ****************************************
> (XEN) Panic on CPU 1:
> (XEN) FATAL PAGE FAULT
> (XEN) [error_code=0010]
> (XEN) Faulting linear address: ffff82c48025d852
> (XEN) ****************************************
> 
> 
> Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
> 

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

end of thread, other threads:[~2011-04-06 15:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-06 14:32 [PATCH] xen: fix hypervisor crash with xentrace Christoph Egger
2011-04-06 14:36 ` Christoph Egger
2011-04-06 15:01   ` Jan Beulich
2011-04-06 14:54 ` Keir Fraser
2011-04-06 15:03 ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).