x86/MCE: Save microcode revision in machine check records
authorTony Luck <tony.luck@intel.com>
Tue, 6 Mar 2018 14:21:41 +0000 (15:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 May 2019 17:19:32 +0000 (19:19 +0200)
commit125a6a65b9feb47a561a7ee98bf8ba91d82e6e2e
tree86f588fbb937269b8575cab720e6db911a9b679b
parentbb4f008d1e075986888ad01579c21f79b62f5775
x86/MCE: Save microcode revision in machine check records

commit fa94d0c6e0f3431523f5701084d799c77c7d4a4f upstream.

Updating microcode used to be relatively rare. Now that it has become
more common we should save the microcode version in a machine check
record to make sure that those people looking at the error have this
important information bundled with the rest of the logged information.

[ Borislav: Simplify a bit. ]

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Yazen Ghannam <yazen.ghannam@amd.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20180301233449.24311-1-tony.luck@intel.com
[bwh: Backported to 4.9:
 - Also add ppin field to struct mce, to match upstream UAPI
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/include/uapi/asm/mce.h
arch/x86/kernel/cpu/mcheck/mce.c