From: "SUZUKI, Kazuhiro" Subject: [PATCH] Support mce logging left over from previous reset in Dom0. Date: Tue, 29 Sep 2009 16:36:28 +0900 (JST) Message-ID: <20090929.163628.129238915.kaz@flab.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Sep_29_16_36_28_2009_996)--" Content-Transfer-Encoding: 7bit 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 ----Next_Part(Tue_Sep_29_16_36_28_2009_996)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, The attached patch set supports machine check logging left over from previous reset in Dom0 boot up stage. enable_mce_log_at_boot-xen.patch: xen part enable_mce_log_at_boot-linux.patch: linux-2.6.18.8 dom0 part enable_mce_log_at_boot-pvops.patch: pvos dom0 part Thanks, KAZ Signed-off-by: Kazuhiro Suzuki ----Next_Part(Tue_Sep_29_16_36_28_2009_996)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="enable_mce_log_at_boot-xen.patch" diff -r 623aa5c2eaa4 xen/arch/x86/cpu/mcheck/mce_intel.c --- a/xen/arch/x86/cpu/mcheck/mce_intel.c Fri Sep 25 15:20:58 2009 +0100 +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c Mon Sep 28 11:14:01 2009 +0900 @@ -1029,10 +1029,10 @@ mctc = mcheck_mca_logout(MCA_RESET, mca_allbanks, &bs, NULL); - /* in the boot up stage, don't inject to DOM0, but print out */ + /* in the boot up stage, print out and also log in DOM0 boot process */ if (bs.errcnt && mctc != NULL) { x86_mcinfo_dump(mctelem_dataptr(mctc)); - mctelem_dismiss(mctc); + mctelem_commit(mctc); } set_in_cr4(X86_CR4_MCE); ----Next_Part(Tue_Sep_29_16_36_28_2009_996)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="enable_mce_log_at_boot-linux.patch" diff -r f1a207ccb493 arch/x86_64/kernel/mce_dom0.c --- a/arch/x86_64/kernel/mce_dom0.c Sun Aug 30 08:54:15 2009 +0100 +++ b/arch/x86_64/kernel/mce_dom0.c Mon Sep 28 11:14:25 2009 +0900 @@ -127,5 +127,8 @@ g_mi = kmalloc(sizeof(struct mc_info), GFP_KERNEL); if (ret < 0) printk(KERN_ERR "MCE_DOM0_LOG: bind_virq for DOM0 failed\n"); + + /* Log the machine checks left over from the previous reset. */ + mce_dom0_interrupt(VIRQ_MCA, NULL, NULL); } ----Next_Part(Tue_Sep_29_16_36_28_2009_996)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="enable_mce_log_at_boot-pvops.patch" diff --git a/drivers/xen/mce.c b/drivers/xen/mce.c index b354dc8..b2e08a0 100644 --- a/drivers/xen/mce.c +++ b/drivers/xen/mce.c @@ -189,6 +189,8 @@ static int bind_virq_for_mce(void) return ret; } + /* Log the machine checks left over from the previous reset. */ + mce_dom_interrupt(VIRQ_MCA, NULL); return 0; } ----Next_Part(Tue_Sep_29_16_36_28_2009_996)-- 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 ----Next_Part(Tue_Sep_29_16_36_28_2009_996)----