All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aravind Gopalakrishnan <aravind.gopalakrishnan@amd.com>
To: Borislav Petkov <bp@alien8.de>
Cc: <tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>,
	<tony.luck@intel.com>, <slaoub@gmail.com>, <luto@amacapital.net>,
	<x86@kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-edac@vger.kernel.org>
Subject: Re: [PATCH] x86, mce, severities: Add AMD severities function
Date: Tue, 17 Mar 2015 13:41:46 -0500	[thread overview]
Message-ID: <5508756A.1090908@amd.com> (raw)
In-Reply-To: <20150317102048.GG19645@pd.tnic>

On 3/17/2015 5:20 AM, Borislav Petkov wrote:
> On Mon, Mar 16, 2015 at 12:16:04PM -0500, Aravind Gopalakrishnan wrote:
>> +/* keeping amd_mce_severity in sync with AMD error scope heirarchy table */
>> +static int amd_mce_severity(struct mce *m, enum context ctx)
>> +{
>> +	/* Processor Context Corrupt, no need to fumble too much, die! */
>> +	if (m->status & MCI_STATUS_PCC)
>> +		return MCE_PANIC_SEVERITY;
>> +
>> +	if (m->status & MCI_STATUS_UC) {
>> +		/*
>> +		 * On older systems, where overflow_recov flag is not
>> +		 * present, we should simply PANIC if Overflow occurs.
>> +		 * If overflow_recov flag set, then SW can try
>> +		 * to at least kill process to salvage systen operation.
>> +		 */
>> +
>> +		/* at least one error was not logged */
>> +		if (m->status & MCI_STATUS_OVER && !mce_flags.overflow_recov)
>> +				return MCE_PANIC_SEVERITY;
>> +
>> +		/* software can try to contain */
>> +		if (!(m->mcgstatus & MCG_STATUS_RIPV) &&
>> +		      mce_flags.overflow_recov) {
>> +			if (ctx == IN_KERNEL)
>> +				return MCE_PANIC_SEVERITY;
> we're testing mce_flags.overflow_recov twice here, perhaps do instead:
>
> 	/*
> 	 * < Comment about overflow recovery bit>
> 	 */
> 	if (mce_flags.overflow_recov) {
> 		if (!(m->mcgstatus & MCG_STATUS_RIPV) && (ctx == IN_KERNEL))
> 			return MCE_PANIC_SEVERITY;

return MCE_AR_SEVERITY if ctx == IN_USER also needs to be within this 
block here.
Will do that and resend.

> 	} else {
> 		if (m->status & MCI_STATUS_OVER)
> 			return MCE_PANIC_SEVERITY;
> 	}
>

Thanks,
-Aravind

  reply	other threads:[~2015-03-17 18:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 17:16 [PATCH] x86, mce, severities: Add AMD severities function Aravind Gopalakrishnan
2015-03-17  7:42 ` Ingo Molnar
2015-03-17  9:04   ` Borislav Petkov
2015-03-17 10:11     ` Ingo Molnar
2015-03-17 10:20 ` Borislav Petkov
2015-03-17 18:41   ` Aravind Gopalakrishnan [this message]
2015-03-17 18:44     ` Borislav Petkov
2015-03-19  0:01       ` Luck, Tony
2015-03-19  9:29         ` Borislav Petkov
2015-03-19 14:41           ` Aravind Gopalakrishnan
2015-03-19 15:53             ` Borislav Petkov
2015-03-19 16:20               ` Aravind Gopalakrishnan
2015-03-19 17:15                 ` Luck, Tony
2015-03-20 15:59                   ` Aravind Gopalakrishnan
2015-03-20 16:03                     ` Borislav Petkov
2015-03-20 17:49                       ` Luck, Tony

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=5508756A.1090908@amd.com \
    --to=aravind.gopalakrishnan@amd.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=mingo@redhat.com \
    --cc=slaoub@gmail.com \
    --cc=tglx@linutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.