All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Radim Krčmář" <rkrcmar@redhat.com>
To: Paolo Bonzini <pbonzini@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 18:21:59 +0100	[thread overview]
Message-ID: <20160323172159.GA22164@potion.brq.redhat.com> (raw)
In-Reply-To: <56F297A7.1030309@redhat.com>

2016-03-23 14:18+0100, Paolo Bonzini:
> On 23/03/2016 06:08, Yuki Shibuya wrote:
>> +		/* If nmi pending > 0 and injectable interrupts exist,
>> +		 * 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.

> Can we instead do something like this in vcpu_enter_guest?

(We should, even if it doesn't fix the bug.  Maskable interrupts can be
 injected while NMIs are blocked.)

What the hell is 2.6.32 doing, though?

  reply	other threads:[~2016-03-23 17: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ář [this message]
2016-03-23 18:22     ` Paolo Bonzini
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=20160323172159.GA22164@potion.brq.redhat.com \
    --to=rkrcmar@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@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 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.