]> git.baikalelectronics.ru Git - kernel.git/commit
x86/mce: Only restart instruction after machine check recovery if it is safe
authorTony Luck <tony.luck@intel.com>
Mon, 14 May 2012 22:07:48 +0000 (15:07 -0700)
committerTony Luck <tony.luck@intel.com>
Mon, 14 May 2012 22:07:48 +0000 (15:07 -0700)
commitfcc42443c2ab7af88bf411703e52e435b9bf1247
tree98ff01524c0e7393616a2ac9102d06ccc3ed6f95
parent2b908e7376fa178128003e46bb83855a61614e49
x86/mce: Only restart instruction after machine check recovery if it is safe

Section 15.3.1.2 of the software developer manual has this to say about the
RIPV bit in the IA32_MCG_STATUS register:

  RIPV (restart IP valid) flag, bit 0 — Indicates (when set) that program
  execution can be restarted reliably at the instruction pointed to by the
  instruction pointer pushed on the stack when the machine-check exception
  is generated.  When clear, the program cannot be reliably restarted at
  the pushed instruction pointer.

We need to save the state of this bit in do_machine_check() and use it
in mce_notify_process() to force a signal; even if memory_failure() says
it made a complete recovery ... e.g. replaced a clean LRU page.

Acked-by: Borislav Petkov <bp@amd64.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/x86/kernel/cpu/mcheck/mce.c