All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Eric Northup <digitaleric@google.com>
Cc: Peijie Yu <yupeijie1012@gmail.com>, kvm@vger.kernel.org
Subject: Re: Linux Crash Caused By KVM?
Date: Sun, 15 Apr 2012 13:05:38 +0300	[thread overview]
Message-ID: <4F8A9D72.7070506@redhat.com> (raw)
In-Reply-To: <CAG7+5M1DaWfTe1hy-3yqqFLGeq3sb=17NyRV0fcZnBEz4WbR0g@mail.gmail.com>

On 04/11/2012 09:59 PM, Eric Northup wrote:
> On Wed, Apr 11, 2012 at 7:45 AM, Avi Kivity <avi@redhat.com> wrote:
> > On 04/11/2012 05:11 AM, Peijie Yu wrote:
> >>      For this problem, i found that panic is caused by
> >> BUG_ON(in_nmi()) which means NMI happened during another NMI Context;
> >> But i check the Intel Technical Manual and found "While an NMI
> >> interrupt handler is executing, the processor disables additional
> >> calls to the NMI handler until the next IRET instruction is executed."
> >> So, how this happen?
> >>
> >
> > The NMI path for kvm is different; the processor exits from the guest
> > with NMIs blocked, then executes kvm code until it issues "int $2" in
> > vmx_complete_interrupts(). If an IRET is executed in this path, then
> > NMIs will be unblocked and nested NMIs may occur.
> >
> > One way this can happen is if we access the vmap area and incur a fault,
> > between the VMEXIT and invoking the NMI handler. Or perhaps the NMI
> > handler itself generates a fault. Or we have a debug exception in that path.
> >
> > Is this reproducible?
>
> As an FYI, there have been BIOSes whose SMI handlers ran IRETs.  So
> the NMI blocking can go away surprisingly.
>
> See 29.8 "NMI handling while in SMM" in the Intel SDM vol 3.

Interesting, thanks.

>From 29.8 it looks like you don't even need to issue IRET within SMM,
since SMM doesn't save/restore the NMI blocking flag.

However, this being a server, and the crash being in kvm code, I don't
think we can rule out that this is a kvm bug.

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


      reply	other threads:[~2012-04-15 10:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-11  2:11 Linux Crash Caused By KVM? Peijie Yu
2012-04-11 14:45 ` Avi Kivity
2012-04-11 18:59   ` Eric Northup
2012-04-15 10:05     ` Avi Kivity [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F8A9D72.7070506@redhat.com \
    --to=avi@redhat.com \
    --cc=digitaleric@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=yupeijie1012@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.