public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: Jan Kiszka <jan.kiszka@web.de>, kvm-devel <kvm@vger.kernel.org>,
	"Xu, Jiajun" <jiajun.xu@intel.com>,
	"Yang, Sheng" <sheng.yang@intel.com>
Subject: Re: [PATCH] KVM: VMX: Fix race between pending IRQ and NMI
Date: Fri, 21 Nov 2008 13:14:31 +0200	[thread overview]
Message-ID: <49269817.7040101@redhat.com> (raw)
In-Reply-To: <492687BE.9030307@siemens.com>

Jan Kiszka wrote:

  

>> enable_nmi_window() should cause an exit once the interrupt has been
>> injected (likely before the first interrupt handler instruction was
>> executed, but after the stack frame was created).  So the nmi will not
>> be delayed.
>>     
>
> Right now, you only call enable_nmi_window() if that window is currently
> closed - and that's not the common case I'm worried about.
>   

That's a thinko.  I'll check if requesting it unconditionally is allowed 
and make it unconditional.

>> But I think I see a bigger issue - if we inject an regular interrupt
>> while another is pending, then we will encounter this problem.  Looks
>> like we have to enable the interrupt window after injecting an interrupt
>> if there are still pending interrupts.
>>     
>
> Yeah, probably. I'm just wondering now if we can set
> exit-on-interrupt-window while the vcpu state is interruptible (ie.
> _before_ the injection). There is some entry check like this for NMIs,
> but maybe no for interrupts. Need to check.
>   

I think that it is allowed.

The manual says "These VM exits follow event injection if such injection 
is specified for VM entry." for  both interrupt windows and nmi windows 
(22.6.5 and 22.6.6).

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  reply	other threads:[~2008-11-21 11:14 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10 15:52 [PATCH] KVM: VMX: Fix race between pending IRQ and NMI Jan Kiszka
2008-11-16 12:29 ` Avi Kivity
2008-11-16 14:58   ` Jan Kiszka
2008-11-16 15:15     ` Avi Kivity
2008-11-16 15:39       ` Jan Kiszka
2008-11-19 17:38         ` Avi Kivity
2008-11-19 21:28           ` Avi Kivity
2008-11-20 13:29             ` Jan Kiszka
2008-11-20 13:59               ` Avi Kivity
2008-11-21 10:04                 ` Jan Kiszka
2008-11-21 11:14                   ` Avi Kivity [this message]
2008-11-22 12:25                   ` Avi Kivity
2008-11-24  9:55                     ` Jan Kiszka
2008-11-25 14:45                       ` Avi Kivity
2008-11-25 14:55                         ` Jan Kiszka

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=49269817.7040101@redhat.com \
    --to=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=jan.kiszka@web.de \
    --cc=jiajun.xu@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=sheng.yang@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox