Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753218AbbBXJ5J (ORCPT ); Tue, 24 Feb 2015 04:57:09 -0500 Received: from mail.skyhub.de ([78.46.96.112]:41881 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752321AbbBXJ5C (ORCPT ); Tue, 24 Feb 2015 04:57:02 -0500 Date: Tue, 24 Feb 2015 10:56:16 +0100 From: Borislav Petkov To: Naoya Horiguchi Cc: Naoya Horiguchi , Tony Luck , Vivek Goyal , "linux-kernel@vger.kernel.org" , Junichi Nomura , Kiyoshi Ueda Subject: Re: [PATCH 1/2] x86: mce: kdump: use under_crashdumping to turn off MCE in all CPUs together Message-ID: <20150224095616.GB3420@pd.tnic> References: <1424682719-16493-1-git-send-email-n-horiguchi@ah.jp.nec.com> <20150223092739.GA22757@pd.tnic> <54EB24BE.5050006@gmail.com> <20150223135842.GA22753@pd.tnic> <54EB4A17.6020800@gmail.com> <20150223170653.GA16699@pd.tnic> <20150224081517.GB2918@hori1.linux.bs1.fc.nec.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150224081517.GB2918@hori1.linux.bs1.fc.nec.co.jp> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1473 Lines: 34 On Tue, Feb 24, 2015 at 08:15:35AM +0000, Naoya Horiguchi wrote: > Let me update my explanation about the problem. I wrote the description about > race window of nmi shoot down threads. That's not wrong, but that's only the > part of the problem. The more suitable description is that all "shot down" > CPUs keep MCE enabled (disable_local_APIC() doesn't stop it) after entering > infinite loop of cpu_relax(), so any MCE event causes kernel panic due to > synchronization timeout whenever after the 2nd kernel launches on the crashing > CPU (where the CPU don't run do_machine_check(), but the other CPUs do). Ok, now we're getting closer. So, I'm thinking you want to disable MCA on all cores going offline as part of the work done in crash_nmi_callback(). And off the top of my head, it should be something what mcheck_cpu_init() and __mcheck_cpu_init_generic() in particular does but in reverse. I'd even venture a guess and say that clearing CR4.MCE should be enough but I *think* that doesn't prevent errors from being logged. Just to be extra sure, you should clear MCG_CTL bits too. It all depends on what exactly you want to do. HTH. -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/