From: Borislav Petkov <bp@suse.de>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "Williams, Dan J" <dan.j.williams@intel.com>,
"Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>,
"Raj, Ashok" <ashok.raj@intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/3 V2] x86/mce: Fix incorrect "Machine check from unknown source" message
Date: Tue, 19 Jun 2018 12:30:17 +0200 [thread overview]
Message-ID: <20180619103016.GC31750@zn.tnic> (raw)
In-Reply-To: <20180530092631.GA2599@zn.tnic>
On Wed, May 30, 2018 at 11:26:32AM +0200, Borislav Petkov wrote:
> > In "x86/mce: Exit properly when no banks to poll" you
> > leap right to the end. I'm wondering whether this can
> > ever happen? I mean, if there are no machine check banks,
> > then how did we get a machine check?
>
> Right, so this looks like some remnant from old times, lemme do some
> archeology...
>
> /me goes and dusts off the full history linux repo...
>
> I found this:
>
> commit 7dd1e1d805d15ca63d05badf40026629ba75cbc8
> Author: Andi Kleen <ak@suse.de>
> Date: Tue Feb 24 17:58:41 2004 -0800
>
> [PATCH] New machine check handler for x86-64
>
> and there's no mention why the !banks check is there.
>
> I'm wondering if we should simply remove it. I mean, as you say, if
> there are no MCA banks, we won't be running in here in the first
> place...
>
> > Both the original, and your new code, skip the:
> >
> > mce_wrmsrl(MSR_IA32_MCG_STATUS, 0);
> >
> > which seems bad. That leaves MCG_STATUS.MCIP set ... so a second
> > machine check would just reset the machine.
>
> That's a good point. It goes away as an issue if we simply drop the
> check.
...and gone it is.
---
From: Borislav Petkov <bp@suse.de>
Date: Tue, 19 Jun 2018 12:27:02 +0200
Subject: [PATCH] x86/mce: Remove !banks check
If we don't have MCA banks, we won't see machine checks anyway. Drop the
check.
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/kernel/cpu/mcheck/mce.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index ea1521ec7e5b..05d2d15a95bd 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1185,9 +1185,6 @@ void do_machine_check(struct pt_regs *regs, long error_code)
this_cpu_inc(mce_exception_count);
- if (!cfg->banks)
- goto out;
-
mce_gather_info(&m, regs);
m.tsc = rdtsc();
@@ -1327,7 +1324,7 @@ void do_machine_check(struct pt_regs *regs, long error_code)
if (worst > 0)
mce_report_event(regs);
mce_wrmsrl(MSR_IA32_MCG_STATUS, 0);
-out:
+
sync_core();
if (worst != MCE_AR_SEVERITY && !kill_it)
--
2.17.0.582.gccdcbd54c
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
--
next prev parent reply other threads:[~2018-06-19 10:30 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 21:40 [PATCH 0/3] x86/mce fixes Tony Luck
2018-05-25 21:41 ` [PATCH 1/3] x86/mce: Improve error message when kernel cannot recover Tony Luck
2018-06-07 20:24 ` [tip:ras/urgent] " tip-bot for Tony Luck
2018-05-25 21:41 ` [PATCH 2/3] x86/mce: Fix incorrect "Machine check from unknown source" message Tony Luck
2018-05-28 20:49 ` Borislav Petkov
2018-05-29 16:15 ` [PATCH 2/3 V2] " Luck, Tony
2018-05-29 17:41 ` Borislav Petkov
2018-05-29 17:50 ` Luck, Tony
2018-05-29 17:53 ` Borislav Petkov
2018-05-29 18:54 ` Luck, Tony
2018-05-29 20:17 ` Dan Williams
2018-05-30 9:26 ` Borislav Petkov
2018-06-19 10:30 ` Borislav Petkov [this message]
2018-05-29 18:22 ` [PATCH 2/3] " Raj, Ashok
2018-05-29 10:42 ` Borislav Petkov
2018-05-29 16:13 ` Luck, Tony
2018-06-22 12:40 ` [tip:ras/core] " tip-bot for Tony Luck
2018-05-25 21:42 ` [PATCH 3/3] x86/mce: Check for alternate indication of machine check recovery on Skylake Tony Luck
2018-06-07 17:43 ` Luck, Tony
2018-06-07 20:18 ` Dan Williams
2018-06-07 20:24 ` Borislav Petkov
2018-06-07 22:26 ` Luck, Tony
2018-06-14 21:57 ` Luck, Tony
2018-06-15 11:45 ` Borislav Petkov
2018-06-15 16:34 ` Luck, Tony
2018-06-15 17:16 ` Borislav Petkov
2018-06-07 20:24 ` Thomas Gleixner
2018-06-07 20:25 ` [tip:ras/urgent] " tip-bot for Tony Luck
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=20180619103016.GC31750@zn.tnic \
--to=bp@suse.de \
--cc=ashok.raj@intel.com \
--cc=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=qiuxu.zhuo@intel.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®