lkml.org 
[lkml]   [2012]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: x86, mce, Use user return notifier in mce
From
On Thu, Jan 12, 2012 at 4:36 PM, Huang Ying <ying.huang@intel.com> wrote:
> Replace the home-made TIF_MCE_NOTIFY based code in MCE with user
> return notifier.

When I looked at this before, I found that the existing user return notifier had
the meaning "call a function before THIS CPU returns to user space". Use in KVM
was to update some MSR that needed adjustment before a cpu ran another user
process.

The MCE code wanted something slightly different: "call a function before THIS
PROCESS returns to user space". So my prototype code from last year made a
whole new set of interfaces - similar in style to the user return
notifier, but with
the MCE semantics.

At first glance it looks like you are just using the user return
notifier code (perhaps
I'm mis-reading the diff?). This won't work - it's possible for a
context switch, and
then the process that hit the MCE may get moved to another cpu, when it will
be run. Meanwhile we'll execute our function in the context of some
other process.

-Tony


\
 
 \ /
  Last update: 2012-01-13 02:49    [W:0.057 / U:0.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site