mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Luck, Tony" <tony.luck@intel.com>
To: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: <linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<x86@kernel.org>, <avadhut.naik@amd.com>, <john.allen@amd.com>
Subject: Re: [PATCH v2] x86/mce: Do away with unnecessary context quirks
Date: Thu, 14 Aug 2025 09:54:54 -0700	[thread overview]
Message-ID: <aJ4U3g4fDNNibUOz@agluck-desk3> (raw)
In-Reply-To: <20250814154809.165916-1-yazen.ghannam@amd.com>

On Thu, Aug 14, 2025 at 11:48:09AM -0400, Yazen Ghannam wrote:
> -/*
> - * During IFU recovery Sandy Bridge -EP4S processors set the RIPV and
> - * EIPV bits in MCG_STATUS to zero on the affected logical processor (SDM
> - * Vol 3B Table 15-20). But this confuses both the code that determines
> - * whether the machine check occurred in kernel or user mode, and also
> - * the severity assessment code. Pretend that EIPV was set, and take the
> - * ip/cs values from the pt_regs that mce_gather_info() ignored earlier.
> - */
> -static __always_inline void
> -quirk_sandybridge_ifu(int bank, struct mce *m, struct pt_regs *regs)
> -{
> -	if (bank != 0)
> -		return;
> -	if ((m->mcgstatus & (MCG_STATUS_EIPV|MCG_STATUS_RIPV)) != 0)
> -		return;
> -	if ((m->status & (MCI_STATUS_OVER|MCI_STATUS_UC|
> -		          MCI_STATUS_EN|MCI_STATUS_MISCV|MCI_STATUS_ADDRV|
> -			  MCI_STATUS_PCC|MCI_STATUS_S|MCI_STATUS_AR|
> -			  MCACOD)) !=
> -			 (MCI_STATUS_UC|MCI_STATUS_EN|
> -			  MCI_STATUS_MISCV|MCI_STATUS_ADDRV|MCI_STATUS_S|
> -			  MCI_STATUS_AR|MCACOD_INSTR))
> -		return;
> -
> -	m->mcgstatus |= MCG_STATUS_EIPV;

I don't think this part of the Sandybridge quirk is covered in your
new code. Without EIPV set, the Intel severity table driven code will
fail to note this as recoverable.

-Tony

  reply	other threads:[~2025-08-14 16:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-14 15:48 Yazen Ghannam
2025-08-14 16:54 ` Luck, Tony [this message]
2025-08-14 19:30   ` Yazen Ghannam
2025-08-14 19:52     ` Luck, Tony
2025-08-14 21:07       ` Yazen Ghannam
2025-08-14 22:17         ` Luck, Tony
2025-08-15 13:42           ` Yazen Ghannam
2025-08-15 16:14             ` 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=aJ4U3g4fDNNibUOz@agluck-desk3 \
    --to=tony.luck@intel.com \
    --cc=avadhut.naik@amd.com \
    --cc=john.allen@amd.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    --cc=yazen.ghannam@amd.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

all inboxes | Powered by JetHome®