public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Ashok Raj <ashok.raj@intel.com>
Cc: X86-kernel <x86@kernel.org>,
	LKML Mailing List <linux-kernel@vger.kernel.org>,
	Dave Hansen <dave.hansen@intel.com>,
	Tony Luck <tony.luck@intel.com>,
	alison.schofield@intel.com, reinette.chatre@intel.com
Subject: Re: [Patch V1 2/7] x86/microcode/intel: Remove retries on early microcode load
Date: Mon, 5 Dec 2022 13:18:58 +0100	[thread overview]
Message-ID: <Y43hstW6oL4naReu@zn.tnic> (raw)
In-Reply-To: <20221129210832.107850-3-ashok.raj@intel.com>

On Tue, Nov 29, 2022 at 01:08:27PM -0800, Ashok Raj wrote:
> There is no direct evidence that these end user issues were caused by this
> retry loop. However, the early boot hangs along with reverting the
> microcode update workaround provide strong circumstantial evidence to
> support the theory that they are linked.

A "circumstantial" reason for why something "might" be broken has no
place in a commit message.

If you still wanna chase this and *actually* give me a sane,
comprehensible reason of why this could cause an endless loop with
officially released microcode, then I'm willing to listen.

Otherwise, I'll apply this:

---
From: Ashok Raj <ashok.raj@intel.com>
Date: Tue, 29 Nov 2022 13:08:27 -0800
Subject: x86/microcode/intel: Remove retries on early microcode load

The retries in load_ucode_intel_ap() were in place to support systems
with mixed steppings. Mixed steppings are no longer supported and there is
only one microcode image at a time. Any retries will simply reattempt to
apply the same image over and over without making progress.

Fixes: 06b8534cb728 ("x86/microcode: Rework microcode loading")
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20221129210832.107850-3-ashok.raj@intel.com
---
 arch/x86/kernel/cpu/microcode/intel.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 4f93875f57b4..d68b084a17e7 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -495,7 +495,6 @@ void load_ucode_intel_ap(void)
 	else
 		iup = &intel_ucode_patch;
 
-reget:
 	if (!*iup) {
 		patch = __load_ucode_intel(&uci);
 		if (!patch)
@@ -505,13 +504,7 @@ void load_ucode_intel_ap(void)
 	}
 
 	uci.mc = *iup;
-
-	if (apply_microcode_early(&uci, true)) {
-		/* Mixed-silicon system? Try to refetch the proper patch: */
-		*iup = NULL;
-
-		goto reget;
-	}
+	apply_microcode_early(&uci, true);
 }
 
 static struct microcode_intel *find_patch(struct ucode_cpu_info *uci)

-- 
2.34.1


-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  parent reply	other threads:[~2022-12-05 12:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 21:08 [Patch V1 0/7] x86/microcode: Some cleanups and fixes for microcode Ashok Raj
2022-11-29 21:08 ` [Patch V1 1/7] x86/microcode/intel: Remove redundant microcode rev pr_info()s Ashok Raj
2022-12-02 18:58   ` Thomas Gleixner
2022-12-03  0:26     ` Ashok Raj
2022-12-03 13:42       ` Borislav Petkov
2022-11-29 21:08 ` [Patch V1 2/7] x86/microcode/intel: Remove retries on early microcode load Ashok Raj
2022-12-02 19:01   ` Thomas Gleixner
2022-12-03  1:48     ` Ashok Raj
2022-12-02 23:53   ` Sohil Mehta
2022-12-03  1:47     ` Ashok Raj
2022-12-05 12:18   ` Borislav Petkov [this message]
2022-12-05 16:42     ` Ashok Raj
2022-12-05 20:53   ` [tip: x86/microcode] x86/microcode/intel: Do not retry microcode reloading on the APs tip-bot2 for Ashok Raj
2022-11-29 21:08 ` [Patch V1 3/7] x86/microcode/core: Move microcode_check() to cpu/microcode/core.c Ashok Raj
2022-12-02 19:02   ` Thomas Gleixner
2022-12-02 20:57   ` Sohil Mehta
2022-12-03  0:21     ` Ashok Raj
2022-12-05 16:25   ` Borislav Petkov
2022-12-05 17:05     ` Ashok Raj
2022-12-05 21:27       ` Borislav Petkov
2022-11-29 21:08 ` [Patch V1 4/7] x86/microcode/core: Take a snapshot before and after applying microcode Ashok Raj
2022-12-02 19:09   ` Thomas Gleixner
2022-12-03  1:57     ` Ashok Raj
2022-12-07 20:25   ` Borislav Petkov
2022-12-08  0:05     ` Ashok Raj
2022-11-29 21:08 ` [Patch V1 5/7] x86/microcode/intel: Prepare the print_ucode_rev to simply take a rev to print Ashok Raj
2022-12-02 19:23   ` Thomas Gleixner
2022-11-29 21:08 ` [Patch V1 6/7] x86/microcode/intel: Print old and new rev during early boot Ashok Raj
2022-12-02 19:29   ` Thomas Gleixner
2022-11-29 21:08 ` [Patch V1 7/7] x86/microcode/intel: Print when early microcode loading fails Ashok Raj
2022-12-02 19:30   ` Thomas Gleixner
2022-12-05 18:19     ` Ashok Raj

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=Y43hstW6oL4naReu@zn.tnic \
    --to=bp@alien8.de \
    --cc=alison.schofield@intel.com \
    --cc=ashok.raj@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reinette.chatre@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox