WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] re-work MCA telemetry internals; use common code

To: "Ke, Liping" <liping.ke@xxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] re-work MCA telemetry internals; use common code for Intel/AMD MCA
From: Frank van der Linden <Frank.Vanderlinden@xxxxxxx>
Date: Tue, 17 Mar 2009 17:32:13 -0600
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 17 Mar 2009 16:32:47 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <E2263E4A5B2284449EEBD0AAB751098401C7E77304@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <49BEE063.1020001@xxxxxxx> <E2263E4A5B2284449EEBD0AAB751098401C7E77304@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.17 (X11/20081023)
Ke, Liping wrote:
Hi, Frank

We did some small test here, found the CMCI problem is caused by the 
"mce_banks_owned" bitmap param passing.
When CMCI happened, we print the bitmap (in smp_cmci_interrupt) value, it's correct (For cpu0, 16c). When passing into mcheck_mca_logout, it turned to be "0xFFFF~~FFF" which is wrong. Only for your info -:)

Still, I suggest split the patch since this patch is realy big  -:)

Thanks a lot for your help!
Criping

Ok, since the patch is already in (thanks Keir!), let's work out any issues you may see with it.

When you say that the mce_banks_owned value is wrong in mcheck_mca_logout, do you mean that the parameter passing somehow went wrong? Is the value ok right before the call, but not in mcheck_mca_logout itself? That would be strange.

You mentioned the polling code: it didn't actually change much, in fact, the general polling code now is pretty much the same as the polling code that was originally in mce_intel.c. That code is very similar. Some AMD code contained AMD-specific things, and has not been touched (it still has its own poll function).

In general, the change is:

* machine_check_poll (going over the banks to look for non-fatal errors) and the loops inside the mcheck handlers that also walk the MC banks, have been combined in one function, which is mcheck_mca_logout. mcheck_mca_logout still takes a context argument, as machine_check_poll did.

* The mcheck handlers themselves mostly just call mcheck_cmn_handler, which calls mcheck_mca_logout, looks at the context, and then decides what to do.

* The mctelem structure as returned by mcheck_mca_logout, contains the relevant telemetry for the current error. If it should be put in the "database" for dom0 retrieval, use mctelem_commit to put it there. Otherwise, the usual course of action is to print the values and uses mctelem_dismiss to discard the information.

There is one thing that needs to be addressed: in your Intel-specific code, you do not reset the per-bank status in the case of a fatal error, so that the BIOS may look at the MSRs. mcheck_mca_logout does always reset the values. The best way to fix this is probably to pass in a flag to mcheck_mca_logout to tell it whether it should reset the status MSRs or not. The caller can then decide if they should be reset later.

Let me know if you have any more issues, I'll be happy to help merge your code and test it.

- Frank



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel