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

Avi Kivity
2010-07-19T07:32:54Z

On 07/18/2010 09:22 PM, Linus Torvalds wrote:
> On Sun, Jul 18, 2010 at 11:04 AM, Avi Kivity<avi@redhat.com> wrote:
>
>> Too simple - an MCE will switch to its own stack, failing the test. Now
>> that we have correctable MCEs, that's not a good idea.
>>
> Ahh, true. And I think we do DEBUG traps with IST too.
>
> So we do need the explicit flag over the region. Too bad. I was hoping
> to handle the nested case without having to set up the percpu segment
> (that whole conditional swapgs thing, which is extra painful in NMI).
>

Well, we have to do that anyway for the non-nested case. So we just do
it before checking whether we're nested or not, and undo it on the popf;
retf path.

--
error compiling committee.c: too many arguments to function