x86/microcode/intel: replace sync_core() with native_cpuid_reg(eax)
authorEvalds Iodzevics <evalds.iodzevics@gmail.com>
Wed, 22 Apr 2020 08:17:59 +0000 (11:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Apr 2020 05:59:16 +0000 (07:59 +0200)
commit552e8e39e155bf8532a8c602ebf070dd8d4c4c41
treed4cd21327aeb5563b5bc877e631a1a435398532d
parent737677595c76821726dc277e15d982d56b98fc26
x86/microcode/intel: replace sync_core() with native_cpuid_reg(eax)

On Intel it is required to do CPUID(1) before reading the microcode
revision MSR. Current code in 4.4 an 4.9 relies on sync_core() to call
CPUID, unfortunately on 32 bit machines code inside sync_core() always
jumps past CPUID instruction as it depends on data structure boot_cpu_data
witch are not populated correctly so early in boot sequence.

It depends on:
commit 5dedade6dfa2 ("x86/CPU: Add native CPUID variants returning a single
datum")

This patch is for 4.4 but also should apply to 4.9

Signed-off-by: Evalds Iodzevics <evalds.iodzevics@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/asm/microcode_intel.h