mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sohil Mehta <sohil.mehta@intel.com>
To: Jon Kohler <jon@nutanix.com>, Dave Hansen <dave.hansen@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	"x86@kernel.org" <x86@kernel.org>, Borislav Petkov <bp@alien8.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Josh Poimboeuf <jpoimboe@kernel.org>,
	Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	Nikolay Borisov <nik.borisov@suse.com>,
	Alex Murray <alex.murray@canonical.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Old microcode CPU matching issue - x86/microcode/intel: Refresh the revisions that determine old_microcode
Date: Thu, 20 Nov 2025 11:13:51 -0800	[thread overview]
Message-ID: <b3e1860e-34ca-4f3e-80e7-363a95ca2697@intel.com> (raw)
In-Reply-To: <cff905c5-7031-46e9-b653-6b8f232e2d0b@intel.com>

On 11/20/2025 9:29 AM, Sohil Mehta wrote:

> diff --git a/arch/x86/kernel/cpu/match.c b/arch/x86/kernel/cpu/match.c
> index 23b13ffc6053..613860448855 100644
> --- a/arch/x86/kernel/cpu/match.c
> +++ b/arch/x86/kernel/cpu/match.c
> @@ -77,7 +77,7 @@ const struct x86_cpu_id *x86_match_cpu(const struct
> x86_cpu_id *match)
>  		    !(BIT(c->x86_stepping) & m->steppings))
>  			continue;
>  		if (m->platform_mask != X86_PLATFORM_ANY &&
> -		    !(BIT(c->x86_platform_id) & m->platform_mask))
> +		    !(c->x86_platform_id & m->platform_mask))
>  			continue;
>  		if (m->feature != X86_FEATURE_ANY && !cpu_has(c, m->feature))
>  			continue;
> 
> 
>> On 6.18 rc6 with a bit of debug logging added, still seeing the same
>>
>> [    0.000000] x86/CPU: microcode 0x721421856 is older than minimum 0x721421881
>> [    0.000000] x86/CPU: MATCH LIST DATA: family 0x6, model 0x8f, steppings 0x100
>> [    0.000000] x86/CPU: BOOT_CPU_DATA: family 0x6, model 0x8f, stepping 0x8
>> [    0.000000] x86/CPU: Running old microcode
>> [    3.404176] microcode: Current revision: 0x2b000620 <<<<< I do have 0x2b000643 on the system, but it didn’t give me a notice that it updated early now
>>
> 

The early loading probably gets affected because intel_get_platform_id()
relies on boot_cpu_data which isn't initialized when load_ucode_bsp() is
called very early.

As you are clearly not running on a 25 year old processor maybe comment
out the INTEL_PENTIUM_III_DESCHUTES check as below just for testing :)

diff --git a/arch/x86/include/asm/microcode.h
b/arch/x86/include/asm/microcode.h
index 6ec2d78c78f0..c1950902a593 100644
--- a/arch/x86/include/asm/microcode.h
+++ b/arch/x86/include/asm/microcode.h
@@ -81,8 +81,8 @@ static inline u32 intel_get_platform_id(void)
 {
 	unsigned int val[2];

-	if (boot_cpu_data.x86_vfm < INTEL_PENTIUM_III_DESCHUTES)
-		return 0;
+	// if (boot_cpu_data.x86_vfm < INTEL_PENTIUM_III_DESCHUTES)
+	//	return 0;

 	/* get processor flags from MSR 0x17 */
 	native_rdmsr(MSR_IA32_PLATFORM_ID, val[0], val[1]);

Both my suggestions are mainly to unblock your testing. An upstreamable
fix would need some additional rework.

>> This was on this proc:
>> smpboot: CPU0: Intel(R) Xeon(R) Gold 5416S (family: 0x6, model: 0x8f, stepping: 0x8)

  reply	other threads:[~2025-11-20 19:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 19:01 [PATCH 0/2] x86/intel: Refresh the old ucode revisions with a script Sohil Mehta
2025-08-18 19:01 ` [PATCH 1/2] x86/microcode/intel: Refresh the revisions that determine old_microcode Sohil Mehta
2025-08-19  5:19   ` Pawan Gupta
2025-08-19 11:18     ` Andrew Cooper
2025-08-19 16:13       ` Sohil Mehta
2025-08-19 18:31         ` Pawan Gupta
2025-08-19 18:28       ` Pawan Gupta
2025-08-19 19:07         ` Dave Hansen
2025-08-19 20:21           ` Andrew Cooper
2025-10-22 17:14   ` Old microcode CPU matching issue - " Jon Kohler
2025-10-22 17:53     ` Dave Hansen
2025-11-14 20:34       ` Dave Hansen
2025-11-20 16:35         ` Jon Kohler
2025-11-20 17:29           ` Sohil Mehta
2025-11-20 19:13             ` Sohil Mehta [this message]
2025-11-20 19:27               ` Dave Hansen
2025-11-21  0:39                 ` Dave Hansen
2025-11-21 20:26                   ` Sohil Mehta
2025-11-26  3:00                   ` Jon Kohler
2025-08-18 19:01 ` [PATCH 2/2] scripts/x86: Add a script to update minimum Intel ucode revisions Sohil Mehta
2025-08-19 17:14   ` Dave Hansen
2025-08-19 20:41     ` Sohil Mehta

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=b3e1860e-34ca-4f3e-80e7-363a95ca2697@intel.com \
    --to=sohil.mehta@intel.com \
    --cc=alex.murray@canonical.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jon@nutanix.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nik.borisov@suse.com \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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®