Re: [PATCH v2] KVM: Fix simultaneous NMIs

Marcelo Tosatti
2011-09-23T12:38:09Z

On Wed, Sep 21, 2011 at 01:44:49PM -0300, Marcelo Tosatti wrote:
> On Wed, Sep 21, 2011 at 11:46:03AM +0300, Avi Kivity wrote:
> > On 09/20/2011 08:28 PM, Avi Kivity wrote:
> > >On 09/20/2011 07:30 PM, Marcelo Tosatti wrote:
> > >>> >
> > >>> >> We do have a small issue. If we exit during
> > >>NMI-blocked-by-STI and
> > >>> >> nmi_pending == 2, then we lose the second interrupt.
> > >>Should rarely
> > >>> >> happen, since external interrupts never exit in that
> > >>condition, but
> > >>> >> it's a wart.
>
> Actually exits in the window between
>
> - increase of nmi_queued
> and
> - transfer to nmi_pending/nmi_injected
>
> Lose all nmi_queued values, no?

Applied the patch, please fix save/restore later, thanks.