lkml.org 
[lkml]   [2013]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] perf, x86: Optimize intel_pmu_pebs_fixup_ip()
From
On Tue, Oct 22, 2013 at 10:12 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>>
>> Careful! There is one magic piece of state that you need to
>> save-and-restore if you do this, namely %cr2. Taking a page fault
>> always writes to %cr2, and we must *not* corrupt it in the NMI
>> handler.
>
> It looks like this is already dealt with (a similar thing is done for
> i386).

Oh, ok then, we should be good to go. I wonder why we needed that
special "_nmi()" version, then..

Please do check that NMI increment the irq-counts etc.. Otherwise
you'll need to add the explicit "pagefault_disable/enable()" pair
around the __copy_from_user_inatomic()..

Linus


\
 
 \ /
  Last update: 2013-10-23 09:21    [W:0.145 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site