x86/microcode/intel: Rip out mixed stepping support for Intel CPUs
authorAshok Raj <ashok.raj@intel.com>
Tue, 17 Oct 2023 21:23:33 +0000 (23:23 +0200)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 19 Oct 2023 10:29:39 +0000 (12:29 +0200)
commitae76d951f6537001bdf77894d19cd4a446de337e
tree04ddcc3e7171d79f452a99848779c0f1ca8e8261
parent0b62f6cb07738d7211d926c39f6946b87f72e792
x86/microcode/intel: Rip out mixed stepping support for Intel CPUs

Mixed steppings aren't supported on Intel CPUs. Only one microcode patch
is required for the entire system. The caching of microcode blobs which
match the family and model is therefore pointless and in fact is
dysfunctional as CPU hotplug updates use only a single microcode blob,
i.e. the one where *intel_ucode_patch points to.

Remove the microcode cache and make it an AMD local feature.

  [ tglx:
     - save only at the end. Otherwise random microcode ends up in the
     pointer for early loading
     - free the ucode patch pointer in save_microcode_patch() only
    after kmemdup() has succeeded, as reported by Andrew Cooper ]

Originally-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/r/20231017211722.404362809@linutronix.de
arch/x86/kernel/cpu/microcode/amd.c
arch/x86/kernel/cpu/microcode/core.c
arch/x86/kernel/cpu/microcode/intel.c
arch/x86/kernel/cpu/microcode/internal.h