Re: [PATCH] x86: Fix Intel microcode revision detection
From: Borislav Petkov
Date: Wed Dec 28 2016 - 06:26:06 EST
On Wed, Dec 28, 2016 at 04:39:31AM +0000, Junichi Nomura wrote:
> early_init_intel() calls sync_core() before rdmsr(MSR_IA32_UCODE_REV),
> assuming sync_core() is effectively CPUID(eax=1). However the assumption
> no longer holds since commit c198b121b1a1 ("x86/asm: Rewrite sync_core()
> to use IRET-to-self").
> As a result, kernel fails to detect the revision of microcode, such as:
> microcode: sig=0x206a7, pf=0x2, revision=0x0
> Conversion from sync_core() to native_cpuid() has already been done in
> Intel microcode driver by commit 484d0e5c7943 ("x86/microcode/intel:
> Replace sync_core() with native_cpuid()"). This patch just extends the
> conversion for early_init_intel().
Good catch, thanks!
However, I want to do something else because we do end up needing those
native CPUID variants pretty often after all so let's generalize the
whole usage case and do the following (patches as reply to this message).
ECO tip #101: Trim your mails when you reply.