mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: Chen Gong <gong.chen@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>, "Huang, Ying" <ying.huang@intel.com>,
	Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Subject: Re: [PATCH 2/2] x86/mce: Add instruction recovery signatures to mce-severity table
Date: Mon, 14 May 2012 19:23:23 +0200	[thread overview]
Message-ID: <20120514172323.GD21960@aftab.osrc.amd.com> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F192EED4A@ORSMSX104.amr.corp.intel.com>

On Mon, May 14, 2012 at 04:28:35PM +0000, Luck, Tony wrote:
> > > I'm trying to figure out a quirk for processors that do generate
> > > EIPV=RIPV=0 signature for IFU errors. There are some case where
> > > we can work around the lack of EIPV.
> >
> > __mcheck_cpu_apply_quirks?
> 
> The quirk is a bit more extensive than just setting some flag in there
> for "if (c->x86 == 6 && c->x86_model == 45)". Sometime EIPV isn't set
> because the regs->ip and regs->cs really aren't valid. So  I'll need
> to do something like:
> 
> 	if (we are on Intel family 6 model 45 AND
>           this is a UC=1, PCC=0, AR=1, S=1, ADDRV=1, MCACOD=0x150 error AND
> 	    (virtophys(regs->ip) >> PAGE_SHIFT) == (MC(bank)_ADDR >> PAGE_SHIFT)) {
> 		/* ok to trust CS & IP */
> 		m.mcgstatus |= MCG_STATUS_EIPV;
> 	}

Hmm, maybe add a flag to struct mce or whatever comes handy in that
codepath which says ->on_this_cpu_it_is_ok_to_set_MCG_STATUS_EIPV and
query it in the mce_severity() thing?

Btw, this severities deal could be much more helpful if it were a bunch
of per-vendor, per-bank or whatever function pointers so that you can do
arbitrary filtering there.

> before running through the mce_severity() table lookup.
> 
> x86 doesn't seem to have a "virtophys()" that I can find. Closest is lookup_address(vaddr, level)
> which gets a pte (which is almost all the work).
> 
> Sigh!

What does __pa() do actually?

Oh, that's only for kernel memory, it seems.

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551

      reply	other threads:[~2012-05-14 17:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10 18:33 [PATCH 0/2] Add machine check recovery for instruction fetch Tony Luck
2012-05-10 18:01 ` [PATCH 1/2] x86/mce: Only restart instruction after machine check recovery if it is safe Tony Luck
2012-05-11  7:19   ` Chen Gong
2012-05-11 16:23     ` Luck, Tony
2012-05-13  9:59   ` Borislav Petkov
2012-05-14 16:16     ` Luck, Tony
2012-05-14 17:17       ` Borislav Petkov
2012-05-14 18:02         ` Tony Luck
2012-05-14 21:55           ` Borislav Petkov
2012-05-10 18:12 ` [PATCH 2/2] x86/mce: Add instruction recovery signatures to mce-severity table Tony Luck
2012-05-11  7:40   ` Chen Gong
2012-05-11 17:42     ` Luck, Tony
2012-05-13 10:05       ` Borislav Petkov
2012-05-14 16:28         ` Luck, Tony
2012-05-14 17:23           ` Borislav Petkov [this message]

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=20120514172323.GD21960@aftab.osrc.amd.com \
    --to=bp@amd64.org \
    --cc=gong.chen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=seto.hidetoshi@jp.fujitsu.com \
    --cc=tony.luck@intel.com \
    --cc=ying.huang@intel.com \
    /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

Powered by JetHome