[lkml]   [2011]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Perhaps a side effect regarding NMI returns
    On Mon, Nov 28, 2011 at 8:07 PM, Steven Rostedt <> wrote:
    > If enabling interrupts also enables NMIs, then there's no side effect.

    The only thing that enables NMI's again is 'iret', afaik. Of course,
    it can be *any* iret, so once you enable interrupts, you can get a
    timer interrupt, and the timer interrupt returning with iret will
    re-enable NMI's then too.

    I would suggest that the actual NMI handler itself should probably
    never use that paranoid exit at all, and just always use a regular
    iret. Screw scheduling and TIF checks.

    Probably only the exceptions that can happen *during* NMI (eg debug,
    stack exception, double-fault etc) should use the paranoid versions
    that try to avoid using iret.

    Because I think you're right - we shouldn't call schedule() from
    within the NMI handler, even if we do enable interrupts and switch to
    the normal stack. Even if it probably does happen to work normally.

    But I have to admit to not necessarily thinking it through a lot.


     \ /
      Last update: 2011-11-29 05:57    [W:0.019 / U:145.088 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site