Re: [PATCH] x86/MCE: Get microcode revision from cpu_info instead of boot_cpu_data

From: Sironi, Filippo
Date: Fri Jun 01 2018 - 08:32:13 EST


> On 1. Jun 2018, at 14:19, Borislav Petkov <bp@xxxxxxxxx> wrote:
>
> On Fri, Jun 01, 2018 at 01:30:26PM +0200, Filippo Sironi wrote:
>> Commit fa94d0c6e0f3 ("x86/MCE: Save microcode revision in machine check
>> records") extended MCE entries to report the microcode revision taken
>> from boot_cpu_data. Unfortunately, boot_cpu_data isn't updated on late
>> microcode loading,
>
> Actually, I'd prefer if we fixed *that* instead by adding:
>
> /* Update boot_cpu_data's revision too, if we're on the BSP: */
> if (c->cpu_index == boot_cpu_data.cpu_index)
> boot_cpu_data.microcode = <new rev>;
>
> to the end of ->apply_microcode() functions so that boot_cpu_data has
> the correct revision too, in case something else queries it.
>
> Thx.
>
> --
> Regards/Gruss,
> Boris.
>
> ECO tip #101: Trim your mails when you reply.
> --

I've that patch in my tree already, I can post it.
I'm still curious on why you'd prefer to use boot_cpu_data for all
CPUs instead of using cpu_data(m->extcpu) though.

Regards,
Filippo


Amazon Development Center Germany GmbH
Berlin - Dresden - Aachen
main office: Krausenstr. 38, 10117 Berlin
Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger
Ust-ID: DE289237879
Eingetragen am Amtsgericht Charlottenburg HRB 149173 B