• Tony Luck's avatar
    x86/mce: Only restart instruction after machine check recovery if it is safe · dad1743e
    Tony Luck authored
    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: default avatarBorislav Petkov <bp@amd64.org>
    Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
    dad1743e
mce.c 53.4 KB