[RFC PATCH 7/9] powerpc: Decode and save machine check event.

Paul Mackerras paulus at samba.org
Thu Aug 8 15:14:22 EST 2013


On Wed, Aug 07, 2013 at 03:09:13PM +0530, Mahesh J Salgaonkar wrote:
> From: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
> 
> Now that we handle machine check in linux, the MCE decoding should also
> take place in linux host. This info is crucial to log before we go down
> in case we can not handle the machine check errors. This patch decodes
> and populates a machine check event which contain high level meaning full
> MCE information.

A couple of things worry me about this patch:

First, there is the fact that we can only do get_mce_event() once for
a given machine check.  You call it in kvmppc_realmode_mc_power7(),
which is fine, but if it is not something we recognize and can handle
we will proceed to exit the guest and jump to machine_check_fwnmi,
which will then proceed to machine_check_common() and then
opal_machine_check(), where you have added another call to
get_mce_event(), which will probably underflow your little per-cpu
stack of machine check events.

Secondly, we shouldn't call save_mce_event() if we're not in
hypervisor mode, since per-cpu variables are not in general accessible
in real mode when running under a hypervisor with a limited real-mode
area (RMA).

Paul.


More information about the Linuxppc-dev mailing list