[lkml]   [2018]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] x86/MCE: Fix CPU microcode version output

On 07/03/2018 12:58 PM, Luck, Tony wrote:
> On Tue, Jul 03, 2018 at 12:48:44PM -0400, Prarit Bhargava wrote:
>> On systems where a runtime microcode update has occurred the
>> microcode version is wrong because boot_cpu_data.microcode is
>> not updated during runtime.
>> Use the per-CPU microcode version in the MCE message.
> Other option would be to fix the microcode update code to make
> sure that boot_cpu_data.microcode is right.

I thought about that too [1] but TBH I've always been a bit confused by
boot_cpu_data vs. cpu_data(). At one point I thought that boot_cpu_data is
valid only up to a specific point in boot and from that point on the cpu_data()
should be used but I'm no longer sure if that's correct.

If that is not correct when should boot_cpu_data be used vs cpu_data()? Is
boot_cpu_data truly supposed to represent the general state of the boot cpu at
boot time?

Look at the same function mce_setup() that I modified in my patch. There is
another reference to boot_cpu_data.x86_vendor (which obviously will never change
during runtime) that likely should be cpu_data() if my understanding above is


[1] Since the kernel now uses a cpu rendezvous model to update the microcode it
would be trivial to set boot_cpu_data.microcode to the new value.

> But if we go this route we should add:
> Fixes: fa94d0c6e0f3 ("x86/MCE: Save microcode revision in machine check records")
> Cc:
> Can also get a:
> Reviewed-by: Tony Luck <>
> -Tony Luck

 \ /
  Last update: 2018-07-03 22:09    [W:0.094 / U:2.560 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site