diff mbox

[RESEND,v2,3/4] xen/mce: always re-initialize 'severity_cpu' in mcheck_cmn_handler()

Message ID 20170407075220.26914-1-haozhong.zhang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Haozhong Zhang April 7, 2017, 7:52 a.m. UTC
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>
---
Reason for resend:
 * Move the re-initialization after its last use, so that we can
   avoid introducing a new mce barrier.
---
 xen/arch/x86/cpu/mcheck/mce.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Jan Beulich April 7, 2017, 1:51 p.m. UTC | #1
>>> On 07.04.17 at 09:52, <haozhong.zhang@intel.com> wrote:
> 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>

Same here as to 4.9.

> ---
> Reason for resend:
>  * Move the re-initialization after its last use, so that we can
>    avoid introducing a new mce barrier.

In the future please don't call this a "resend" - it is a new version if
you make a change.

Jan
diff mbox

Patch

diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c
index a2e9668..0d9d5b0 100644
--- a/xen/arch/x86/cpu/mcheck/mce.c
+++ b/xen/arch/x86/cpu/mcheck/mce.c
@@ -523,6 +523,7 @@  void mcheck_cmn_handler(const struct cpu_user_regs *regs)
             mc_panic(ebuf);
         }
         atomic_set(&found_error, 0);
+        atomic_set(&severity_cpu, -1);
     }
     mce_barrier_exit(&mce_trap_bar);