From: Borislav Petkov <bp@amd64.org>
To: Tony Luck <tony.luck@intel.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Borislav Petkov <bp@amd64.org>,
Chen Gong <gong.chen@linux.intel.com>,
"Huang, Ying" <ying.huang@intel.com>,
Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Subject: Re: [PATCH 1/2] x86/mce: Only restart instruction after machine check recovery if it is safe
Date: Sun, 13 May 2012 11:59:13 +0200 [thread overview]
Message-ID: <20120513095913.GB28863@aftab.osrc.amd.com> (raw)
In-Reply-To: <e6fa674d2f4ded80201f733d06b234b21559f0fe.1336674796.git.tony.luck@intel.com>
On Thu, May 10, 2012 at 11:01:20AM -0700, Tony Luck wrote:
> Section 15.3.1.2 of the software developer manual has this to say about the
> RIPV bit in the IA32_MCG_STATUS register:
>
> RIPV (restart IP valid) flag, bit 0 — Indicates (when set) that program
> execution can be restarted reliably at the instruction pointed to by the
> instruction pointer pushed on the stack when the machine-check exception
> is generated. When clear, the program cannot be reliably restarted at
> the pushed instruction pointer.
>
> We need to save the state of this bit in do_machine_check() and use it
> in mce_notify_process() to force a signal; even if memory_failure() says
> it made a complete recovery ... e.g. replaced a clean LRU page).
>
> Signed-off-by: Tony Luck <tony.luck@intel.com>
> ---
> arch/x86/kernel/cpu/mcheck/mce.c | 9 ++++++---
> 1 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
> index 66e1c51..3b8ebdc 100644
> --- a/arch/x86/kernel/cpu/mcheck/mce.c
> +++ b/arch/x86/kernel/cpu/mcheck/mce.c
> @@ -947,9 +947,10 @@ struct mce_info {
> atomic_t inuse;
> struct task_struct *t;
> __u64 paddr;
> + int restartable;
Is it me or does this look like a flag, or a bitfield? Instead of
wasting a whole integer for a single bit of information.
It will probably end up the same size though due to compiler padding
since this struct is currently 4 + 2*8 byte without the ->restartable
thing.
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
next prev parent reply other threads:[~2012-05-13 9:59 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 18:33 [PATCH 0/2] Add machine check recovery for instruction fetch Tony Luck
2012-05-10 18:01 ` [PATCH 1/2] x86/mce: Only restart instruction after machine check recovery if it is safe Tony Luck
2012-05-11 7:19 ` Chen Gong
2012-05-11 16:23 ` Luck, Tony
2012-05-13 9:59 ` Borislav Petkov [this message]
2012-05-14 16:16 ` Luck, Tony
2012-05-14 17:17 ` Borislav Petkov
2012-05-14 18:02 ` Tony Luck
2012-05-14 21:55 ` Borislav Petkov
2012-05-10 18:12 ` [PATCH 2/2] x86/mce: Add instruction recovery signatures to mce-severity table Tony Luck
2012-05-11 7:40 ` Chen Gong
2012-05-11 17:42 ` Luck, Tony
2012-05-13 10:05 ` Borislav Petkov
2012-05-14 16:28 ` Luck, Tony
2012-05-14 17:23 ` Borislav Petkov
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=20120513095913.GB28863@aftab.osrc.amd.com \
--to=bp@amd64.org \
--cc=gong.chen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=seto.hidetoshi@jp.fujitsu.com \
--cc=tony.luck@intel.com \
--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
all inboxes | Powered by JetHome®