Re: [patch 1/2] x86_64 page fault NMI-safe

From: Ingo Molnar
Date: Wed Jul 14 2010 - 17:18:54 EST



* Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Wed, Jul 14, 2010 at 1:17 PM, Mathieu Desnoyers
> <mathieu.desnoyers@xxxxxxxxxxxx> wrote:
> >
> > It only handles the case of a single NMI coming in. What happens in this
> > scenario?
>
> [ two nested NMI's ]
>
> The _right_ thing happens.
>
> What do you think the hardware would have done itself? The NMI was blocked.
> It wouldn't get replayed twice. If you have two NMI's happening while
> another NMI is active, you will get a single NMI after the first NMI has
> completed.

If it ever became an issue, we could even do what softirqs do and re-execute
the NMI handler. At least for things like PMU NMIs we have to handle them once
they have been (re-)issued, or we'd get a stuck PMU.

But in any case it should be a non-issue.

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/