From: Marcelo Tosatti <mtosatti@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH 1/6] KVM: Check for pending events before attempting injection
Date: Thu, 29 Jul 2010 12:44:06 -0300 [thread overview]
Message-ID: <20100729154406.GA2441@amt.cnet> (raw)
In-Reply-To: <4C51409B.6000305@redhat.com>
On Thu, Jul 29, 2010 at 11:49:31AM +0300, Avi Kivity wrote:
> On 07/28/2010 08:22 PM, Marcelo Tosatti wrote:
> >
> >>>>>that needs reinjection (or an exception).
> >>>>That can happen event now, no? A pending exception, interrupt comes
> >>>>along, injection picks up the exception but leaves the interrupt.
> >>>>
> >>>>Now the situation can be more complicated:
> >>>>
> >>>>- pending exception
> >>>>- injection
> >>>>- interrupt, sets KVM_REQ_EVENT
> >>>>- notices KVM_REQ_EVENT
> >>>>- drops KVM_REQ_EVENT, cancels exception (made pending again)
> >>>>- goes back
> >>>>- injection (injects exception again, interrupt is pending)
> >>>>
> >>>>as far as I can tell, this is all fine.
> >>>But you cleared KVM_REQ_EVENT. Which means you're not going to inject
> >>>the pending interrupt on the next entry.
> >>Doh. So we need to set KVM_REQ_EVENT again, after the final check
> >>for vcpu->requests, to make sure we redo injection again.
> >>
> >>So we can make inject_pending_event() return true if there's more in
> >>the queue, and if it did, re-raise KVM_REQ_EVENT just before entry?
> >Yeah, that would do it.
>
> On second and third thoughts, that is unneeded. If an interrupt or
> nmi is still pending after event injection, we will request an
> interrupt or nmi window which will set KVM_REQ_EVENT. An exception
> cannot be pending after an event injection since it is the highest
> priority event.
>
> Yes?
Yep. Userspace irqchip is still broken though. Can't see whats wrong
with svm.
next prev parent reply other threads:[~2010-07-29 15:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-27 13:19 [PATCH 0/6] Nonatomic interrupt injection Avi Kivity
2010-07-27 13:19 ` [PATCH 1/6] KVM: Check for pending events before attempting injection Avi Kivity
2010-07-28 16:21 ` Marcelo Tosatti
2010-07-28 16:31 ` Avi Kivity
2010-07-28 16:37 ` Marcelo Tosatti
2010-07-28 16:53 ` Avi Kivity
2010-07-28 17:22 ` Marcelo Tosatti
2010-07-29 8:49 ` Avi Kivity
2010-07-29 15:44 ` Marcelo Tosatti [this message]
2010-07-29 6:51 ` Gleb Natapov
2010-07-29 8:56 ` Avi Kivity
2010-07-27 13:19 ` [PATCH 2/6] KVM: VMX: Split up vmx_complete_interrupts() Avi Kivity
2010-07-27 13:19 ` [PATCH 3/6] KVM: VMX: Move real-mode interrupt injection fixup to vmx_complete_interrupts() Avi Kivity
2010-07-27 13:19 ` [PATCH 4/6] KVM: VMX: Parameterize vmx_complete_interrupts() for both exit and entry Avi Kivity
2010-07-27 13:19 ` [PATCH 5/6] KVM: Non-atomic interrupt injection Avi Kivity
2010-07-27 13:19 ` [PATCH 6/6] KVM: VMX: Move fixup_rmode_irq() to avoid forward declaration Avi Kivity
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=20100729154406.GA2441@amt.cnet \
--to=mtosatti@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
/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