mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Raj, Ashok" <ashok.raj@intel.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@suse.de>, Ingo Molnar <mingo@kernel.org>,
	Tony Luck <tony.luck@intel.com>, X86-ML <x86@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Chen Gong <gong.chen@linux.intel.com>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Oleg Nesterov <oleg@redhat.com>,
	linux-edac <linux-edac@vger.kernel.org>,
	Ashok Raj <ashok.raj@intel.com>
Subject: Re: [PATCH 7/7] x86/mce: Clear Local MCE opt-in before kexec
Date: Fri, 17 Jul 2015 00:52:21 -0400	[thread overview]
Message-ID: <20150717045221.GA3798@otc-brkl-03.jf.intel.com> (raw)
In-Reply-To: <CALCETrVgDCbUXMMu6AXdwzZJYQ7qYYfPiP3NaPpOm7L8jEdxpQ@mail.gmail.com>

On Thu, Jul 16, 2015 at 06:16:50PM -0700, Andy Lutomirski wrote:
> > From: Ashok Raj <ashok.raj@intel.com>
> >
> > kexec could boot a kernel that could be legacy with no knowledge of
> > LMCE. Hence we should make sure we clear LMCE optin before kexec reboot.
> >
> 
> What happens if an offline-but-not-unplugged CPU gets an MCE?  Or does
> this code also clear CR4.MCE?

kexec doesn't use cpu_offline() path, but uses an IPI to all threads
before letting the BSP jump to new kernel.

In this patch, we only turned off the LMCE opt-in. CR4.MCE isn't touched.

if an offline-but-not-unplugged CPU gets an MCE its usually fatal and will
be broadcast to all cpus in the system.

Turning off CR4.MCE would not be good, since any thread that receives an MCE
and has CR4.MCE=0 would result in resetting the whole system.

There are other bugs in MCE in the offline path that i'm working on to send a 
patch update.

for e.g. one such bug is that during CPU_DOWN_PREPARE mce_disable_cpu() 
turns off MCx_CTL().

Machine check banks in uncore are visible to all logical cpus. We should not 
clear them. Today offlining a single cpu would disable MCE generation for any
of the uncore banks. I have them brewing in a test, should release in a couple
weeks or so. 

We can only clear banks if they are only thread local during cpu_offline(). 
We don't have such banks today (but coming). Most banks are either core scoped 
or socket scoped.

Cheers,
Ashok

  reply	other threads:[~2015-07-17  3:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-10 21:57 [GIT PULL] x86/ras material for 4.3 queue Luck, Tony
2015-07-15 11:30 ` Ingo Molnar
2015-07-16  7:39   ` Borislav Petkov
2015-07-16  7:44     ` [PATCH 1/7] x86/mce: Provide a lockless memory pool to save error records Borislav Petkov
2015-07-16  7:44       ` [PATCH 2/7] x86/mce: Don't use percpu workqueues Borislav Petkov
2015-07-16  7:44       ` [PATCH 3/7] x86/mce: Remove the MCE ring for Action Optional errors Borislav Petkov
2015-07-16  7:44       ` [PATCH 4/7] x86/mce: Avoid potential deadlock due to printk() in MCE context Borislav Petkov
2015-07-16  7:44       ` [PATCH 5/7] x86/mce: Kill drain_mcelog_buffer() Borislav Petkov
2015-07-16  7:44       ` [PATCH 6/7] x86/mce: Remove unused function declarations Borislav Petkov
2015-07-16  7:44       ` [PATCH 7/7] x86/mce: Clear Local MCE opt-in before kexec Borislav Petkov
2015-07-17  1:16         ` Andy Lutomirski
2015-07-17  4:52           ` Raj, Ashok [this message]
2015-07-21  8:29       ` [PATCH 1/7] x86/mce: Provide a lockless memory pool to save error records Ingo Molnar
2015-07-21 10:03         ` Borislav Petkov
2015-07-21 10:08           ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150717045221.GA3798@otc-brkl-03.jf.intel.com \
    --to=ashok.raj@intel.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=bp@suse.de \
    --cc=gong.chen@linux.intel.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®