From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754367AbcIAMiI (ORCPT ); Thu, 1 Sep 2016 08:38:08 -0400 Received: from mail.skyhub.de ([78.46.96.112]:50730 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750841AbcIAMiG (ORCPT ); Thu, 1 Sep 2016 08:38:06 -0400 Date: Thu, 1 Sep 2016 14:38:09 +0200 From: Borislav Petkov To: "Luck, Tony" Cc: Linus Torvalds , Ingo Molnar , Boris Petkov , Dan Williams , "H. Peter Anvin" , Peter Zijlstra , Thomas Gleixner , Linux Kernel Mailing List Subject: Re: [PATCH V2 2/4] x86/mce, PCI: Provide quirks to identify Xeon models with machine check recovery Message-ID: <20160901123809.GA15785@nazgul.tnic> References: <20160827052634.GB19332@nazgul.tnic> <20160830185333.GA6297@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160830185333.GA6297@intel.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 30, 2016 at 11:53:33AM -0700, Luck, Tony wrote: > Each Xeon includes a number of capability registers in PCI space > that describe some features not enumerated by CPUID. > > Use these to determine that we are running on a model that can recover > from machine checks. Hooks for Ivybridge ... Skylake provided. > > Signed-off-by: Tony Luck > --- ... > diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c > index 79d8ec849468..c192fabc3d76 100644 > --- a/arch/x86/kernel/cpu/mcheck/mce.c > +++ b/arch/x86/kernel/cpu/mcheck/mce.c > @@ -41,6 +41,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -2676,8 +2677,14 @@ static int __init mcheck_debugfs_init(void) > static int __init mcheck_debugfs_init(void) { return -EINVAL; } > #endif > > +DEFINE_STATIC_KEY_FALSE(mcsafe_key); > +EXPORT_SYMBOL_GPL(mcsafe_key); > + > static int __init mcheck_late_init(void) > { > + if (mca_cfg.recovery) What are we doing with the recovery bool? You want to keep the cmdline switch: mce=recovery? Btw, it needs documenting over mcheck_enable(). -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --