x86/cpu: Read/save PPIN MSR during initialization
authorTony Luck <tony.luck@intel.com>
Mon, 31 Jan 2022 23:01:09 +0000 (15:01 -0800)
committerBorislav Petkov <bp@suse.de>
Tue, 1 Feb 2022 15:29:26 +0000 (16:29 +0100)
commit822ccfade55b6be7977b364356fcf2d78d8a373a
tree801825ff6ecde7e19bad0c0110fccb0cbae18863
parent00a2f23eef7d1fa6c2dfdc613857b84fbf5e2b3b
x86/cpu: Read/save PPIN MSR during initialization

Currently, the PPIN (Protected Processor Inventory Number) MSR is read
by every CPU that processes a machine check, CMCI, or just polls machine
check banks from a periodic timer. This is not a "fast" MSR, so this
adds to overhead of processing errors.

Add a new "ppin" field to the cpuinfo_x86 structure. Read and save the
PPIN during initialization. Use this copy in mce_setup() instead of
reading the MSR.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220131230111.2004669-4-tony.luck@intel.com
arch/x86/include/asm/processor.h
arch/x86/kernel/cpu/common.c
arch/x86/kernel/cpu/mce/core.c