From: Prarit Bhargava <prarit@redhat.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: linux-kernel@vger.kernel.org, Borislav Petkov <bp@alien8.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org, linux-edac@vger.kernel.org
Subject: Re: [PATCH] x86/MCE: Fix CPU microcode version output
Date: Tue, 3 Jul 2018 16:08:41 -0400 [thread overview]
Message-ID: <5ed43b85-a92f-8d6c-4565-d2e88d6d3f08@redhat.com> (raw)
In-Reply-To: <20180703165849.GA17773@agluck-desk>
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
correct.
P.
[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: stable@vger.kernel.org
>
> Can also get a:
>
> Reviewed-by: Tony Luck <tony.luck@intel.com>
>
> -Tony Luck
>
next prev parent reply other threads:[~2018-07-03 20:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 16:48 Prarit Bhargava
2018-07-03 16:58 ` Luck, Tony
2018-07-03 20:08 ` Prarit Bhargava [this message]
2018-07-03 21:43 ` Borislav Petkov
2018-07-30 15:23 ` Prarit Bhargava
2018-07-30 16:16 ` Borislav Petkov
2018-07-31 7:43 ` Sironi, Filippo
2018-07-31 9:04 ` Borislav Petkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5ed43b85-a92f-8d6c-4565-d2e88d6d3f08@redhat.com \
--to=prarit@redhat.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®