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

2010-07-29 Thread Marcelo Tosatti
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

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

2010-07-29 Thread Avi Kivity
On 07/29/2010 09:51 AM, Gleb Natapov wrote: On Tue, Jul 27, 2010 at 04:19:35PM +0300, Avi Kivity wrote: Instead of blindly attempting to inject an event before each guest entry, check for a possible event first in vcpu->requests. Sites that can trigger event injection are modified to set KVM_R

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

2010-07-29 Thread Avi Kivity
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 - in

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

2010-07-28 Thread Gleb Natapov
On Tue, Jul 27, 2010 at 04:19:35PM +0300, Avi Kivity wrote: > Instead of blindly attempting to inject an event before each guest entry, > check for a possible event first in vcpu->requests. Sites that can trigger > event injection are modified to set KVM_REQ_EVENT: > > - interrupt, nmi window ope

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

2010-07-28 Thread Marcelo Tosatti
On Wed, Jul 28, 2010 at 07:53:32PM +0300, Avi Kivity wrote: > On 07/28/2010 07:37 PM, Marcelo Tosatti wrote: > >On Wed, Jul 28, 2010 at 07:31:03PM +0300, Avi Kivity wrote: > >> On 07/28/2010 07:21 PM, Marcelo Tosatti wrote: > >>>On Tue, Jul 27, 2010 at 04:19:35PM +0300, Avi Kivity wrote: > In

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

2010-07-28 Thread Avi Kivity
On 07/28/2010 07:37 PM, Marcelo Tosatti wrote: On Wed, Jul 28, 2010 at 07:31:03PM +0300, Avi Kivity wrote: On 07/28/2010 07:21 PM, Marcelo Tosatti wrote: On Tue, Jul 27, 2010 at 04:19:35PM +0300, Avi Kivity wrote: Instead of blindly attempting to inject an event before each guest entry, che

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

2010-07-28 Thread Marcelo Tosatti
On Wed, Jul 28, 2010 at 07:31:03PM +0300, Avi Kivity wrote: > On 07/28/2010 07:21 PM, Marcelo Tosatti wrote: > >On Tue, Jul 27, 2010 at 04:19:35PM +0300, Avi Kivity wrote: > >>Instead of blindly attempting to inject an event before each guest entry, > >>check for a possible event first in vcpu->re

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

2010-07-28 Thread Avi Kivity
On 07/28/2010 07:21 PM, Marcelo Tosatti wrote: On Tue, Jul 27, 2010 at 04:19:35PM +0300, Avi Kivity wrote: Instead of blindly attempting to inject an event before each guest entry, check for a possible event first in vcpu->requests. Sites that can trigger event injection are modified to set KV

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

2010-07-28 Thread Marcelo Tosatti
On Tue, Jul 27, 2010 at 04:19:35PM +0300, Avi Kivity wrote: > Instead of blindly attempting to inject an event before each guest entry, > check for a possible event first in vcpu->requests. Sites that can trigger > event injection are modified to set KVM_REQ_EVENT: > > - interrupt, nmi window ope

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

2010-07-27 Thread Avi Kivity
Instead of blindly attempting to inject an event before each guest entry, check for a possible event first in vcpu->requests. Sites that can trigger event injection are modified to set KVM_REQ_EVENT: - interrupt, nmi window opening - ppr updates - i8259 output changes - local apic irr changes - r