mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chang S. Bae" <chang.seok.bae@intel.com>
To: Sohil Mehta <sohil.mehta@intel.com>, <linux-kernel@vger.kernel.org>
Cc: <x86@kernel.org>, <tglx@kernel.org>, <mingo@redhat.com>,
	<bp@alien8.de>, <dave.hansen@linux.intel.com>, <hpa@zytor.com>,
	<andrew.cooper3@citrix.com>, <arjan.van.de.ven@intel.com>,
	<stable@vger.kernel.org>
Subject: Re: [PATCH 1/8] x86/microcode/intel: Reject problematic loading on GNR systems
Date: Tue, 8 Sep 2026 16:03:23 -0700	[thread overview]
Message-ID: <fdbe32b9-2de9-45d5-b3e7-ba031c3e6f00@intel.com> (raw)
In-Reply-To: <d035139c-6b37-46f3-baff-a27d0f1a082e@intel.com>

On 9/2/2026 6:11 AM, Sohil Mehta wrote:
> On 9/1/2026 4:16 PM, Chang S. Bae wrote:
>> Revision 0x1000405 contains internal microcode changes that are required
>> by subsequent revisions to avoid #MC during loading.
> 
> Before going to the solution space, can we add some more
> context/background here?
> 
> For example:
> 
> GNR revision 0x1000405 introduces a breaking change that causes a #MC
> when the OS updates the microcode from any version older than 0x1000405
> to a newer version. This is applicable to late load as well as early
> loading during boot.
> 
> A BIOS or firmware update is required to update the revision to
> 0x1000405 or newer before any OS updates can be safely loaded.
> This dependency ...

Thanks. I ended up taking Dave's version for V2.


>> Prevent loading 0x1000405 or later when the system has not yet been
>> updated to 0x1000405 or later.
> 
> This is a bit confusing. Should it say jumping from any anything older
> than 0x1000405 to anything newer?

I tweaked it in V2 to:
  "Prevent loading 0x1000405 or later unless the running revision is
   already at least 0x1000405."


>> +	if (vfm == INTEL_GRANITERAPIDS_X &&
>> +	    x86_stepping(sig->sig) == 1 &&
>> +	    sig->pf & 0x95 &&
>> +	    sig->rev < 0x1000405 &&
>> +	    rev >= 0x1000405) {
> 
> I don't think we have a helper that can be used here directly. Also,
> this is tagged for stable so adding a new one probably doesn't make sense.
> 
> But, 0x1000405 is repeated way too many times in this function :)
> At a minimum, can we add something like this?
> 
> #define GNR98_UCODE_MIN_REV 	0x1000405
> 
> Maybe add defines for the PF as well?


I saw exactly the same suggestion from AI, but I was not sure much value 
beyond more cosmetic. The revision is a one-off specific to the blocking 
check, so putting the revision value directly instead of a new define.


> 
> 
>> +		if (rev == 0x1000405)
>> +			pr_err_once("Erratum GNR98: 0x1000405 is not loadable.\n");
> 
> 						   ^ revision

Let me add `revision` in the message. Thanks.

> 
> With early load, his is probably one of the first messages that folks
> will see but it will only be displayed on platforms that have the issue
> until they update their microcode. Should we be more verbose here?
> 
> 
>> +		else
>> +			pr_err_once("Erratum GNR98: 0x1000405 is required before 0x%x.\n", rev);
> 
> "Erratum GNR98: revision 0x1000405 is required before revision 0x%x can
> be loaded. \n"
> 
> Should this be 0x1000405 *or later* ? We don't want common users to
> specifically try to find the revision 0x1000405 and load it, right?


For the error messages, `GNR98` needs to be decoded anyway, since the 
full context of the erratum is needed to understand for the next step. 
The message then is intended to point the erratum with a brief 
explanation. So I don't think it is too terse.

> 
> I am wondering what is the use of the if-else? Is that intended to guide
> the late loading users? I think for other users the second message would
> be confusing.

When the incoming revision is exactly 0x1000405, saying "revision 
0x1000405 is required" doesn't make any sense. For the later revisions, 
the second message can explain more directly too. So I split the two cases.

Thanks,
Chang

  parent reply	other threads:[~2026-09-08 23:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 23:16 [PATCH 0/8] x86/microcode: Address GNR errata and follow-up Chang S. Bae
2026-09-01 23:16 ` [PATCH 1/8] x86/microcode/intel: Reject problematic loading on GNR systems Chang S. Bae
2026-09-02 13:11   ` Sohil Mehta
2026-09-02 13:21     ` Van De Ven, Arjan
2026-09-08 23:03     ` Chang S. Bae [this message]
2026-09-02 14:23   ` Dave Hansen
2026-09-03  1:51   ` Borislav Petkov
2026-09-03 21:04     ` Chang S. Bae
2026-09-08 22:32   ` [PATCH v2] x86/microcode/intel: Reject problematic loading on Granite Rapids systems Chang S. Bae
2026-09-08 23:16     ` Dave Hansen
2026-09-09  0:13     ` Borislav Petkov
2026-09-09  0:39       ` Chang S. Bae
2026-09-09  0:14     ` Andrew Cooper
2026-09-01 23:16 ` [PATCH 2/8] x86/microcode: Solidify base_rev= option parsing Chang S. Bae
2026-09-01 23:16 ` [PATCH 3/8] x86/microcode: Accept a boolean for force_minrev parameter Chang S. Bae
2026-09-01 23:16 ` [PATCH 4/8] x86/microcode: Mark early_data __initdata Chang S. Bae
2026-09-01 23:16 ` [PATCH RFC 5/8] x86/microcode: Decouple minimum revision check from late loading Chang S. Bae
2026-09-01 23:16 ` [PATCH RFC 6/8] x86/microcode/intel: Apply minimum revision check to early loading Chang S. Bae
2026-09-01 23:16 ` [PATCH RFC 7/8] x86/microcode: Introduce iterative late loading Chang S. Bae
2026-09-01 23:16 ` [PATCH RFC 8/8] x86/microcode/intel: Select the lowest loadable revision for iterative loading Chang S. Bae
2026-09-08 23:07 ` [PATCH 0/8] x86/microcode: Address GNR errata and follow-up Chang S. Bae

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=fdbe32b9-2de9-45d5-b3e7-ba031c3e6f00@intel.com \
    --to=chang.seok.bae@intel.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=arjan.van.de.ven@intel.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sohil.mehta@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@kernel.org \
    --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®