Re: [PATCH 1/6] KVM: Check for pending events before attempting injection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux