From: Horms Subject: Re: [PATCH] kexec: framework and i386 (Take XIV) Date: Fri, 1 Sep 2006 11:56:11 +0900 Message-ID: <20060901025610.GE31034@verge.net.au> References: <20060525072017.GA25881@verge.net.au> <20060711033900.GA26632@verge.net.au> <20060811074839.GA21317@verge.net.au> <20060831074259.GB23148@verge.net.au> <88C6CCDB437DC3takebe_akio@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <88C6CCDB437DC3takebe_akio@jp.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Akio Takebe Cc: Ian Pratt , Kazuo Moriwaka , xen-devel@lists.xensource.com, "Zou, Nanhai" , Magnus Damm , Isaku Yamahata , Mark Williamson , xen-ia64-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Thu, Aug 31, 2006 at 05:55:52PM +0900, Akio Takebe wrote: > Hi, Horms and Magnus > > Good work. :-) > I have one commet. > > I believe crash_kexec should be directly called > when unknown NMI is occurred. > In your patch, crash_kexec is called as the bellow. > 1. unknown NMI is occurred. (e.g. by pushing NMI botton) > 2. xen recieved NMI and call do_nmi. > 3. xen report to dom0 by using raise_softirq(NMI_SOFTIRQ). > 4. dom0 call crash_kexec of dom0. > 5. crash_kexec of dom0 call crash_kexec of xen > > Am I correct? > The above process is not reliable if I'm correct. > So I belive crash_kexec of xen should be directly called like the > following patch. > > diff -r 9611a5c9e1a1 xen/arch/x86/traps.c > --- a/xen/arch/x86/traps.c Thu Aug 31 13:12:26 2006 +0900 > +++ b/xen/arch/x86/traps.c Thu Aug 31 17:40:19 2006 +0900 > @@ -1612,6 +1612,7 @@ asmlinkage void do_nmi(struct cpu_user_r > else if ( reason & 0x40 ) > io_check_error(regs); > else if ( !nmi_watchdog ) > + crash_kexec(NULL); > unknown_nmi_error((unsigned char)(reason&0xff)); > } > } > > What do you think about it? That seems like a good idea to me. Though I think you are missing { }. Can you test to see if this works? --- a/xen/arch/x86/traps.c 2006-09-01 11:53:44.000000000 +0900 +++ b/xen/arch/x86/traps.c 2006-09-01 11:53:56.000000000 +0900 @@ -1611,8 +1611,10 @@ mem_parity_error(regs); else if ( reason & 0x40 ) io_check_error(regs); - else if ( !nmi_watchdog ) + else if ( !nmi_watchdog ) { + crash_kexec(NULL); unknown_nmi_error((unsigned char)(reason&0xff)); + } } }