x86/MCE: Extend table to report action optional errors through CMCI too
authorXie XiuQi <xiexiuqi@huawei.com>
Mon, 4 Dec 2017 16:54:37 +0000 (17:54 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 4 Dec 2017 19:38:44 +0000 (20:38 +0100)
commite085ac7a6ddbd746966083c5e13aa290c3e9a253
tree543edd4a294fcdbe2460a0579e054e3fdad8da27
parentb29c6ef7bb1257853c1e31616d84f55e561cf631
x86/MCE: Extend table to report action optional errors through CMCI too

According to the Intel SDM Volume 3B (253669-063US, July 2017), action
optional (SRAO) errors can be reported either via MCE or CMC:

  In cases when SRAO is signaled via CMCI the error signature is
  indicated via UC=1, PCC=0, S=0.

  Type(*1) UC EN PCC S AR Signaling
  ---------------------------------------------------------------
  UC 1 1 1 x x MCE
  SRAR 1 1 0 1 1 MCE
  SRAO 1 x(*2) 0 x(*2) 0 MCE/CMC
  UCNA 1 x 0 0 0 CMC
  CE 0 x x x x CMC

  NOTES:
  1. SRAR, SRAO and UCNA errors are supported by the processor only
     when IA32_MCG_CAP[24] (MCG_SER_P) is set.
  2. EN=1, S=1 when signaled via MCE. EN=x, S=0 when signaled via CMC.

And there is a description in 15.6.2 UCR Error Reporting and Logging, for
bit S:

  S (Signaling) flag, bit 56 - Indicates (when set) that a machine check
  exception was generated for the UCR error reported in this MC bank...
  When the S flag in the IA32_MCi_STATUS register is clear, this UCR error
  was not signaled via a machine check exception and instead was reported
  as a corrected machine check (CMC).

So merge the two cases and just remove the S=0 check for SRAO in
mce_severity().

[ Borislav: Massage commit message.]

Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Tested-by: Chen Wei <chenwei68@huawei.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1511575548-41992-1-git-send-email-xiexiuqi@huawei.com
arch/x86/kernel/cpu/mcheck/mce-severity.c