public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Yuki Shibuya <shibuya.yk@ncos.nec.co.jp>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Nobuo Yoshida <yoshida.nb@ncos.nec.co.jp>
Subject: Re: [PATCH v2] KVM: x86: Inject pending interrupt even if pending nmi exist
Date: Wed, 23 Mar 2016 19:22:21 +0100	[thread overview]
Message-ID: <56F2DEDD.5060600@redhat.com> (raw)
In-Reply-To: <20160323172159.GA22164@potion.brq.redhat.com>



On 23/03/2016 18:21, Radim Krčmář wrote:
> > > +		 * nmi pending counter is cleared to prevent skipping
> > > +		 * injectable pending interrupts.
> > > +		 */
> > > +		if (vcpu->arch.nmi_pending && kvm_cpu_has_injectable_intr(vcpu)
> > > +					&& kvm_x86_ops->interrupt_allowed(vcpu))
> > > +			vcpu->arch.nmi_pending = 0;
> > 
> > I am not sure I understand this.  Why is it safe to drop nmi_pending?
> 
> NMIs are latched (queue length 1) and therefore cannot be pending after
> an injection.  I think we want to do it unconditionally.

If that is right, process_nmi would be the place where you'd limit the
queue to 1.

Paolo

  reply	other threads:[~2016-03-23 18:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23  5:08 [PATCH v2] KVM: x86: Inject pending interrupt even if pending nmi exist Yuki Shibuya
2016-03-23 13:18 ` Paolo Bonzini
2016-03-23 17:21   ` Radim Krčmář
2016-03-23 18:22     ` Paolo Bonzini [this message]
2016-03-23 19:04       ` Radim Krčmář
2016-03-23 21:00         ` Paolo Bonzini
2016-03-23 21:06           ` Jan Kiszka
2016-03-23 21:11             ` Paolo Bonzini
2016-03-23 21:55               ` Radim Krčmář
2016-03-24  5:08                 ` Yuki Shibuya
2016-03-24 11:09                   ` Paolo Bonzini
2016-03-23 21:52           ` Radim Krčmář

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=56F2DEDD.5060600@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=rkrcmar@redhat.com \
    --cc=shibuya.yk@ncos.nec.co.jp \
    --cc=yoshida.nb@ncos.nec.co.jp \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox