Re: [PATCH 10/13] x86/microcode/AMD: Check patch level only on the BSP

From: Thomas Gleixner
Date: Tue Jan 17 2017 - 15:43:27 EST


On Tue, 17 Jan 2017, Borislav Petkov wrote:

> From: Borislav Petkov <bp@xxxxxxx>
>
> Check final patch levels for AMD only on the BSP. This way, we decide
> early and only once whether to continue loading or to leave the loader
> disabled on such systems.
>
> Simplify a lot.
>
> Signed-off-by: Borislav Petkov <bp@xxxxxxx>
> void __init load_ucode_bsp(void)
> {
> - unsigned int vendor, cpuid_1_eax;
> + unsigned int cpuid_1_eax;
>
> if (check_loader_disabled_bsp())
> return;
>
> - vendor = x86_cpuid_vendor();
> cpuid_1_eax = native_cpuid_eax(1);
>
> - switch (vendor) {
> + switch (x86_cpuid_vendor()) {
> case X86_VENDOR_INTEL:
> if (x86_family(cpuid_1_eax) >= 6)
> load_ucode_intel_bsp();
> @@ -155,15 +195,14 @@ static bool check_loader_disabled_ap(void)
>
> void load_ucode_ap(void)
> {
> - unsigned int vendor, cpuid_1_eax;
> + unsigned int cpuid_1_eax;
>
> if (check_loader_disabled_ap())
> return;
>
> - vendor = x86_cpuid_vendor();
> cpuid_1_eax = native_cpuid_eax(1);
>
> - switch (vendor) {
> + switch (x86_cpuid_vendor()) {
> case X86_VENDOR_INTEL:
> if (x86_family(cpuid_1_eax) >= 6)
> load_ucode_intel_ap();

These two hunks look unrelated to $subject. Please seperate them out.

Thanks,

tglx