x86/mce: clear MSR_IA32_MCG_STATUS by writing 0
authorHaozhong Zhang <haozhong.zhang@intel.com>
Wed, 8 Mar 2017 14:10:45 +0000 (15:10 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 8 Mar 2017 14:10:45 +0000 (15:10 +0100)
commit6fd56bc825e633470fb0807785cd32dbee8182a6
treea54a91534473018a0efc8417b6b7cb55fe2574ea
parent795b988e7c3d271c9472d4b9150b57a3e5b5a50b
x86/mce: clear MSR_IA32_MCG_STATUS by writing 0

On Intel CPU, an attemp to write to MSR_IA32_MCG_STATUS with any
non-zero value would result in #GP.

This commit writes 0 on AMD CPU as well instead of just clearing MCIP
bit, because all non-reserved bits of MSR_IA32_MCG_STATUS have been
handled at this point.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
xen/arch/x86/cpu/mcheck/mce.c