From: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
To: Huang Ying <ying.huang@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>, "hpa@zytor.com" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mingo@elte.hu" <mingo@elte.hu>,
"tglx@linutronix.de" <tglx@linutronix.de>
Subject: Re: [PATCH] [3/4] x86: MCE: Improve mce_get_rip
Date: Fri, 24 Apr 2009 19:11:52 +0900 [thread overview]
Message-ID: <49F19068.4040904@jp.fujitsu.com> (raw)
In-Reply-To: <1240563147.6842.891.camel@yhuang-dev.sh.intel.com>
Huang Ying wrote:
> On Fri, 2009-04-24 at 15:28 +0800, Hidetoshi Seto wrote:
>> Huang Ying wrote:
>>> On Fri, 2009-04-24 at 14:16 +0800, Hidetoshi Seto wrote:
>>>> One question is: if (RIPV,EIPV) = (0,0), then is the IP on the stack
>>>> really invalid value, or is it still point IP when MCE is generated?
>>>> I suppose it is not invalid. If a processor encounters MCE and if it
>>>> is not sure what happened, then it will store the IP on the stack,
>>>> indicating neither of flags.
>>>>
>>>> If this supposition is correct, the best way is pick the value on
>>>> the stack unconditionally, and record valid flags together.
>>> According to spec, the IP on stack can be not related to MCE if
>>> (RIPV,EIPV) = (0,0). So it is meaningless to report them. If you report
>>> them unconditionally, you just push the logic to user space or
>>> administrator.
>> Sorry, I could not find good page in the spec (Intel64 and IA-32 ASDM)...
>> Could you point one?
>
> 14.3.1.2 IA32_MCG_STATUS MSR
> * EIPV
Quote:
"EIPV (error IP valid) flag, bit 1 ― Indicates (when set) that the
instruction pointed to by the instruction pointer pushed onto the
stack when the machine-check exception is generated is directly
associated with the error. When this flag is cleared, the instruction
pointed to may not be associated with the error."
My understanding is:
If EIPV is 1:
IP value on the stack is one pushed when the MCE is generated,
and the IP is associated with the error.
If EIPV is 0:
IP value on the stack is one pushed when the MCE is generated,
but the IP is not associated with the error.
So I repeat my question again:
You stated in the description of this patch:
"mce_get_rip() is used to get IP when MCE is generated, ..."
Is this right?
If right, I think EIPV is not matter.
If not, please rewrite the description.
>> I believe that the IP with (RIPV,EIPV) = (1,0) is "not associated with the
>> error" too, so is it meaningless to report the IP?
>> If you think so then correct fix is replacing RIPV check by EIPV check.
>
> In theory, that is possible (not associated), but I think in practical,
> IP with (RIPV,EIPV) = (1,0) is still meaningful as Andi said.
Then, why IP with (0,0) is meaningless?
Why not use it with the !INEXACT! marker?
>> From another point of view, the reported IP will be one of followings:
>> - IP that associated with error (= related to MCE)
>> - IP that the interrupted program can restart from
>> - IP that when MCE is generated
>> Are there no way to distinguish them in user space?
>
> I think you just push same logic to user space.
No, I just want a logical explanation.
It seems we already can provide records with "inexact" value.
Why not expand such cases?
Thanks,
H.Seto
next prev parent reply other threads:[~2009-04-24 10:12 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-07 15:06 [PATCH] [0/4] x86: MCE: Machine check bug fix series for 2.6.30 Andi Kleen
2009-04-07 15:06 ` [PATCH] [1/4] x86: MCE: Make polling timer interval per CPU Andi Kleen
2009-04-08 3:43 ` Hidetoshi Seto
2009-04-08 10:43 ` Andi Kleen
2009-04-08 11:30 ` Hidetoshi Seto
2009-04-08 11:40 ` Andi Kleen
2009-04-09 10:28 ` [PATCH] [1/4] x86: MCE: Make polling timer interval per CPU v2 Andi Kleen
2009-04-07 15:06 ` [PATCH] [2/4] x86: MCE: Fix boot logging logic Andi Kleen
2009-04-07 15:06 ` [PATCH] [3/4] x86: MCE: Improve mce_get_rip Andi Kleen
2009-04-08 8:15 ` Hidetoshi Seto
2009-04-08 10:06 ` Andi Kleen
2009-04-09 4:59 ` Hidetoshi Seto
2009-04-09 7:14 ` Andi Kleen
2009-04-09 9:59 ` Hidetoshi Seto
2009-04-09 10:13 ` Andi Kleen
2009-04-10 4:38 ` Hidetoshi Seto
2009-04-10 8:25 ` Andi Kleen
2009-04-10 9:49 ` Hidetoshi Seto
2009-04-23 9:43 ` Huang Ying
2009-04-24 6:16 ` Hidetoshi Seto
2009-04-24 6:35 ` Huang Ying
2009-04-24 7:28 ` Hidetoshi Seto
2009-04-24 8:50 ` Andi Kleen
2009-04-24 8:52 ` Huang Ying
2009-04-24 10:11 ` Hidetoshi Seto [this message]
2009-04-07 15:06 ` [PATCH] [4/4] x86: MCE: Fix EIPV behaviour with !PCC Andi Kleen
2009-04-23 9:43 ` Huang Ying
2009-04-23 20:49 ` H. Peter Anvin
2009-04-24 8:35 ` Andi Kleen
2009-04-24 0:27 ` Hidetoshi Seto
2009-04-24 1:11 ` Huang Ying
2009-04-24 5:40 ` H. Peter Anvin
2009-04-24 8:46 ` Andi Kleen
2009-04-24 10:30 ` Hidetoshi Seto
2009-04-24 16:32 ` H. Peter Anvin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49F19068.4040904@jp.fujitsu.com \
--to=seto.hidetoshi@jp.fujitsu.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=ying.huang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox