* [PATCH] X86: Fix a little mca bug
@ 2011-05-19 12:03 Liu, Jinsong
2011-05-20 8:10 ` Keir Fraser
0 siblings, 1 reply; 3+ messages in thread
From: Liu, Jinsong @ 2011-05-19 12:03 UTC (permalink / raw)
To: Keir Fraser, xen-devel; +Cc: Jiang, Yunhong, Dong, Eddie, Li, Xin
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
X86: Fix a little mca bug
At x86_mcinfo_dump(), a little bug at printk information, illusively
indicate an CMCI/POLLED error to a MCE error, this will make debug confusing.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
diff -r 2fe45768d2c1 xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c Tue May 10 13:58:21 2011 +0800
+++ b/xen/arch/x86/cpu/mcheck/mce.c Thu May 19 15:10:07 2011 +0800
@@ -944,10 +944,11 @@ void x86_mcinfo_dump(struct mc_info *mi)
printk(XENLOG_WARNING
"CPU%d: Machine Check Exception: %16"PRIx64"\n",
mc_global->mc_coreid, mc_global->mc_gstatus);
- } else {
- printk(XENLOG_WARNING "MCE: The hardware reports a non "
- "fatal, correctable incident occurred on "
- "CPU %d.\n",
+ } else if (mc_global->mc_flags & MC_FLAG_CMCI) {
+ printk(XENLOG_WARNING "CMCI occurred on CPU %d.\n",
+ mc_global->mc_coreid);
+ } else if (mc_global->mc_flags & MC_FLAG_POLLED) {
+ printk(XENLOG_WARNING "POLLED occurred on CPU %d.\n",
mc_global->mc_coreid);
}
[-- Attachment #2: mca-cleanup.patch --]
[-- Type: application/octet-stream, Size: 1120 bytes --]
Fix a little mca bug
At x86_mcinfo_dump(), a little bug at printk information, illusively
indicate an CMCI/POLLED error to a MCE error, this will make debug confusing.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
diff -r 2fe45768d2c1 xen/arch/x86/cpu/mcheck/mce.c
--- a/xen/arch/x86/cpu/mcheck/mce.c Tue May 10 13:58:21 2011 +0800
+++ b/xen/arch/x86/cpu/mcheck/mce.c Thu May 19 15:10:07 2011 +0800
@@ -944,10 +944,11 @@ void x86_mcinfo_dump(struct mc_info *mi)
printk(XENLOG_WARNING
"CPU%d: Machine Check Exception: %16"PRIx64"\n",
mc_global->mc_coreid, mc_global->mc_gstatus);
- } else {
- printk(XENLOG_WARNING "MCE: The hardware reports a non "
- "fatal, correctable incident occurred on "
- "CPU %d.\n",
+ } else if (mc_global->mc_flags & MC_FLAG_CMCI) {
+ printk(XENLOG_WARNING "CMCI occurred on CPU %d.\n",
+ mc_global->mc_coreid);
+ } else if (mc_global->mc_flags & MC_FLAG_POLLED) {
+ printk(XENLOG_WARNING "POLLED occurred on CPU %d.\n",
mc_global->mc_coreid);
}
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] X86: Fix a little mca bug
2011-05-19 12:03 [PATCH] X86: Fix a little mca bug Liu, Jinsong
@ 2011-05-20 8:10 ` Keir Fraser
2011-05-20 11:50 ` Liu, Jinsong
0 siblings, 1 reply; 3+ messages in thread
From: Keir Fraser @ 2011-05-20 8:10 UTC (permalink / raw)
To: Liu, Jinsong, xen-devel; +Cc: Jiang, Yunhong, Dong, Eddie, Li, Xin
On 19/05/2011 13:03, "Liu, Jinsong" <jinsong.liu@intel.com> wrote:
> X86: Fix a little mca bug
>
> At x86_mcinfo_dump(), a little bug at printk information, illusively
> indicate an CMCI/POLLED error to a MCE error, this will make debug confusing.
Is it correct to have entirely removed the final else clause?
-- Keir
> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
>
> diff -r 2fe45768d2c1 xen/arch/x86/cpu/mcheck/mce.c
> --- a/xen/arch/x86/cpu/mcheck/mce.c Tue May 10 13:58:21 2011 +0800
> +++ b/xen/arch/x86/cpu/mcheck/mce.c Thu May 19 15:10:07 2011 +0800
> @@ -944,10 +944,11 @@ void x86_mcinfo_dump(struct mc_info *mi)
> printk(XENLOG_WARNING
> "CPU%d: Machine Check Exception: %16"PRIx64"\n",
> mc_global->mc_coreid, mc_global->mc_gstatus);
> - } else {
> - printk(XENLOG_WARNING "MCE: The hardware reports a non "
> - "fatal, correctable incident occurred on "
> - "CPU %d.\n",
> + } else if (mc_global->mc_flags & MC_FLAG_CMCI) {
> + printk(XENLOG_WARNING "CMCI occurred on CPU %d.\n",
> + mc_global->mc_coreid);
> + } else if (mc_global->mc_flags & MC_FLAG_POLLED) {
> + printk(XENLOG_WARNING "POLLED occurred on CPU %d.\n",
> mc_global->mc_coreid);
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] X86: Fix a little mca bug
2011-05-20 8:10 ` Keir Fraser
@ 2011-05-20 11:50 ` Liu, Jinsong
0 siblings, 0 replies; 3+ messages in thread
From: Liu, Jinsong @ 2011-05-20 11:50 UTC (permalink / raw)
To: Keir Fraser, xen-devel; +Cc: Jiang, Yunhong, Dong, Eddie, Li, Xin
Keir Fraser wrote:
> On 19/05/2011 13:03, "Liu, Jinsong" <jinsong.liu@intel.com> wrote:
>
>> X86: Fix a little mca bug
>>
>> At x86_mcinfo_dump(), a little bug at printk information, illusively
>> indicate an CMCI/POLLED error to a MCE error, this will make debug
>> confusing.
>
> Is it correct to have entirely removed the final else clause?
>
> -- Keir
Of course it's correct to entirely remove the final else, ..., anyway, it's just used to pritnk debug info.
However, the case MC_FLAG_CMCI and MC_FLAG_POLLED indeed used by cmci and polled handler, disclosing more debug info.
depending on your decision :)
Thanks,
Jinsong
>
>> Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
>>
>> diff -r 2fe45768d2c1 xen/arch/x86/cpu/mcheck/mce.c
>> --- a/xen/arch/x86/cpu/mcheck/mce.c Tue May 10 13:58:21 2011 +0800
>> +++ b/xen/arch/x86/cpu/mcheck/mce.c Thu May 19 15:10:07 2011 +0800
>> @@ -944,10 +944,11 @@ void x86_mcinfo_dump(struct mc_info *mi)
>> printk(XENLOG_WARNING
>> "CPU%d: Machine Check Exception: %16"PRIx64"\n",
>> mc_global->mc_coreid, mc_global->mc_gstatus);
>> - } else {
>> - printk(XENLOG_WARNING "MCE: The hardware reports a non "
>> - "fatal, correctable incident occurred on "
>> - "CPU %d.\n",
>> + } else if (mc_global->mc_flags & MC_FLAG_CMCI) {
>> + printk(XENLOG_WARNING "CMCI occurred on CPU %d.\n",
>> + mc_global->mc_coreid);
>> + } else if (mc_global->mc_flags & MC_FLAG_POLLED) {
>> + printk(XENLOG_WARNING "POLLED occurred on CPU %d.\n",
>> mc_global->mc_coreid);
>> }
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-20 11:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 12:03 [PATCH] X86: Fix a little mca bug Liu, Jinsong
2011-05-20 8:10 ` Keir Fraser
2011-05-20 11:50 ` Liu, Jinsong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.