mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
x86, intel: Clear Error counter field when set new cmci owner
Since cmci might happened when cpu is taking down (cpu hotplug) before setting new cmci owner while old owner is down. We need to clear the corrected error counter field to make sure CMCI could be triggered on the new owner. Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Liping Ke <liping.ke@intel.com>
This commit is contained in:
1 parent
f99dc195cc
commit
cfbcb394f9
2 files changed
+8
No files matched your search
@@ -358,6 +358,12 @@ static int do_cmci_discover(int i)
|
||||
return 0;
|
||||
}
|
||||
set_bit(i, __get_cpu_var(mce_banks_owned));
|
||||
/* Clear Corected Error Counter field, make sure CMCI could
|
||||
* be triggered on the new owner
|
||||
*/
|
||||
msr = MSR_IA32_MC0_STATUS + 4 * i;
|
||||
rdmsrl(msr, val);
|
||||
wrmsrl(msr, val & ~MCi_STATUS_ERRCOUNT);
|
||||
out:
|
||||
clear_bit(i, __get_cpu_var(no_cmci_banks));
|
||||
return 1;
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
#define MCi_STATUS_MSEC 0x00000000ffff0000ULL
|
||||
/* Other information */
|
||||
#define MCi_STATUS_OTHER 0x01ffffff00000000ULL
|
||||
/*Corrected Error Count*/
|
||||
#define MCi_STATUS_ERRCOUNT 0x001FFFC0000000000ULL
|
||||
/* processor context corrupt */
|
||||
#define MCi_STATUS_PCC 0x0200000000000000ULL
|
||||
/* MSR_K8_MCi_ADDR register valid */
|
||||
|
||||