OpenCloudOS-Kernel/arch/x86/kernel/cpu/mce
Tony Luck 59b5809655 x86/mce: Fix logic and comments around MSR_PPIN_CTL
There are two implemented bits in the PPIN_CTL MSR:

Bit 0: LockOut (R/WO)
      Set 1 to prevent further writes to MSR_PPIN_CTL.

Bit 1: Enable_PPIN (R/W)
       If 1, enables MSR_PPIN to be accessible using RDMSR.
       If 0, an attempt to read MSR_PPIN will cause #GP.

So there are four defined values:
	0: PPIN is disabled, PPIN_CTL may be updated
	1: PPIN is disabled. PPIN_CTL is locked against updates
	2: PPIN is enabled. PPIN_CTL may be updated
	3: PPIN is enabled. PPIN_CTL is locked against updates

Code would only enable the X86_FEATURE_INTEL_PPIN feature for case "2".
When it should have done so for both case "2" and case "3".

Fix the final test to just check for the enable bit. Also fix some of
the other comments in this function.

Fixes: 3f5a7896a5 ("x86/mce: Include the PPIN in MCE records when available")
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/20200226011737.9958-1-tony.luck@intel.com
2020-02-27 21:36:42 +01:00
..
Makefile
amd.c x86/mce/amd: Fix kobject lifetime 2020-02-14 09:28:31 +01:00
apei.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 333 2019-06-05 17:37:06 +02:00
core.c Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2020-01-27 09:19:35 -08:00
dev-mcelog.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
genpool.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 437 2019-06-05 17:37:17 +02:00
inject.c x86/mce: Remove mce_inject_log() in favor of mce_log() 2019-12-17 10:26:41 +01:00
intel.c x86/mce: Fix logic and comments around MSR_PPIN_CTL 2020-02-27 21:36:42 +01:00
internal.h x86/mce: Remove mce_inject_log() in favor of mce_log() 2019-12-17 10:26:41 +01:00
p5.c
severity.c x86/mce: Don't check for the overflow bit on action optional machine checks 2019-08-05 09:34:02 +02:00
therm_throt.c x86/mce/therm_throt: Undo thermal polling properly on CPU offline 2020-02-25 21:21:44 +01:00
threshold.c Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-12-26 17:03:51 -08:00
winchip.c