From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH] xen: fix hypervisor crash with xentrace Date: Wed, 6 Apr 2011 15:32:00 +0100 Message-ID: <201104061632.02099.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_ilHnNoNkJtBOJRs" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_ilHnNoNkJtBOJRs Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, Attached patch fixes hypervisor crashes when xentrace buffer gets initialized. The xen backtraces I have seen are: (XEN) Xen call trace: (XEN) [] early_stack+0x0/0x48 (XEN) [] tb_control+0x182/0x278 (XEN) [] do_sysctl+0x1fc/0xa40 (XEN) [] 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) [] notifier_chain_register+0x0/0x35 (XEN) [] alloc_trace_bufs+0x5cd/0x7a9 (XEN) [] tb_control+0x182/0x278 (XEN) [] do_sysctl+0x1fc/0xa40 (XEN) [] 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 -- ---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 --Boundary-00=_ilHnNoNkJtBOJRs Content-Type: text/x-diff; charset="iso 8859-15"; name="xen_xentrace.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_xentrace.diff" Content-Description: xen_xentrace.diff 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; --Boundary-00=_ilHnNoNkJtBOJRs Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_ilHnNoNkJtBOJRs--