linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/microcode/intel: Drop wbinvd(), no longer required
@ 2022-08-29 18:25 Ashok Raj
  2022-09-02  6:08 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Ashok Raj @ 2022-08-29 18:25 UTC (permalink / raw)
  To: Borislav Petkov, Thomas Gleixner
  Cc: LKML Mailing List, X86-kernel, Dave Hansen, Andy Lutomirski,
	Ingo Molnar, Ashok Raj, Tony Luck

Some older processors had a bad interaction when updating microcode if the
caches were dirty causing machine checks. The wbinvd() was added to
mitigate that before doing microcode updates. Now that Linux checks for the
minimum version before performing an update, those old microcode versions
can't be loaded.  Remove calls to wbinvd().

Depends on Link below:

Link: https://lore.kernel.org/lkml/20220829180436.716672-1-ashok.raj@intel.com/T/#u
Reviewed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
---
 arch/x86/kernel/cpu/microcode/intel.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 332ba19e0147..ae3c7ed15e79 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -536,12 +536,6 @@ static int apply_microcode_early(struct ucode_cpu_info *uci, bool early)
 		return UCODE_OK;
 	}
 
-	/*
-	 * Writeback and invalidate caches before updating microcode to avoid
-	 * internal issues depending on what the microcode is updating.
-	 */
-	native_wbinvd();
-
 	/* write microcode via MSR 0x79 */
 	native_wrmsrl(MSR_IA32_UCODE_WRITE, (unsigned long)mc->bits);
 
@@ -758,12 +752,6 @@ static enum ucode_state apply_microcode_intel(int cpu)
 		goto out;
 	}
 
-	/*
-	 * Writeback and invalidate caches before updating microcode to avoid
-	 * internal issues depending on what the microcode is updating.
-	 */
-	native_wbinvd();
-
 	/* write microcode via MSR 0x79 */
 	wrmsrl(MSR_IA32_UCODE_WRITE, (unsigned long)mc->bits);
 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] x86/microcode/intel: Drop wbinvd(), no longer required
  2022-08-29 18:25 [PATCH] x86/microcode/intel: Drop wbinvd(), no longer required Ashok Raj
@ 2022-09-02  6:08 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2022-09-02  6:08 UTC (permalink / raw)
  To: Ashok Raj
  Cc: Thomas Gleixner, LKML Mailing List, X86-kernel, Dave Hansen,
	Andy Lutomirski, Ingo Molnar, Tony Luck

On Mon, Aug 29, 2022 at 06:25:57PM +0000, Ashok Raj wrote:
> Depends on Link below:

Please send patches together in a set like everyone else. This one
should simply be part of the min_rev set - not sent separately.

Thx.

-- 
Regards/Gruss,
    Boris.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-02  6:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-29 18:25 [PATCH] x86/microcode/intel: Drop wbinvd(), no longer required Ashok Raj
2022-09-02  6:08 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).