File 58e79a79-x86-mce-always-reinit-severity_cpu.patch of Package xen.7317

# Commit 6a2c6a68423475cd89a8cc9978554880e5a21b7d
# Date 2017-04-07 15:56:09 +0200
# Author Haozhong Zhang <haozhong.zhang@intel.com>
# Committer Jan Beulich <jbeulich@suse.com>
x86/mce: always re-initialize 'severity_cpu' in mcheck_cmn_handler()

mcheck_cmn_handler() does not always set 'severity_cpu' to override
its value taken from previous rounds of MC handling, which will
interfere the current round of MC handling. Always re-initialize it to
clear the historical value.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/cpu/mcheck/mce.c
+++ b/xen/arch/x86/cpu/mcheck/mce.c
@@ -532,6 +532,7 @@ void mcheck_cmn_handler(struct cpu_user_
             mc_panic(ebuf);
         }
         atomic_set(&found_error, 0);
+        atomic_set(&severity_cpu, -1);
     }
     mce_barrier_exit(&mce_trap_bar); 
 
openSUSE Build Service is sponsored by