Re: [PATCH] KVM: x86: Check for nested events if there is an injectable interrupt

2014-07-08 Thread Wanpeng Li
On Tue, Jul 08, 2014 at 10:00:35AM +0200, Paolo Bonzini wrote: >Il 08/07/2014 08:56, Jan Kiszka ha scritto: >>I don't think arch.nmi_pending can flip asynchronously, only in the >>context of the VCPU thread - in contrast to pending IRQ states. > >Right, only nmi_queued is changed from other

Re: [PATCH] KVM: x86: Check for nested events if there is an injectable interrupt

2014-07-08 Thread Paolo Bonzini
Il 08/07/2014 08:56, Jan Kiszka ha scritto: I don't think arch.nmi_pending can flip asynchronously, only in the context of the VCPU thread - in contrast to pending IRQ states. Right, only nmi_queued is changed from other threads. /me should really look at the code instead of going from

Re: [PATCH] KVM: x86: Check for nested events if there is an injectable interrupt

2014-07-08 Thread Jan Kiszka
On 2014-07-08 07:50, Paolo Bonzini wrote: > Il 08/07/2014 06:30, Bandan Das ha scritto: >> >> With commit b6b8a1451fc40412c57d1 that introduced >> vmx_check_nested_events, checks for injectable interrupts happen >> at different points in time for L1 and L2 that could potentially >> cause a race.

Re: [PATCH] KVM: x86: Check for nested events if there is an injectable interrupt

2014-07-08 Thread Jan Kiszka
On 2014-07-08 07:50, Paolo Bonzini wrote: Il 08/07/2014 06:30, Bandan Das ha scritto: With commit b6b8a1451fc40412c57d1 that introduced vmx_check_nested_events, checks for injectable interrupts happen at different points in time for L1 and L2 that could potentially cause a race. The

Re: [PATCH] KVM: x86: Check for nested events if there is an injectable interrupt

2014-07-08 Thread Paolo Bonzini
Il 08/07/2014 08:56, Jan Kiszka ha scritto: I don't think arch.nmi_pending can flip asynchronously, only in the context of the VCPU thread - in contrast to pending IRQ states. Right, only nmi_queued is changed from other threads. /me should really look at the code instead of going from

Re: [PATCH] KVM: x86: Check for nested events if there is an injectable interrupt

2014-07-08 Thread Wanpeng Li
On Tue, Jul 08, 2014 at 10:00:35AM +0200, Paolo Bonzini wrote: Il 08/07/2014 08:56, Jan Kiszka ha scritto: I don't think arch.nmi_pending can flip asynchronously, only in the context of the VCPU thread - in contrast to pending IRQ states. Right, only nmi_queued is changed from other threads. /me

Re: [PATCH] KVM: x86: Check for nested events if there is an injectable interrupt

2014-07-07 Thread Paolo Bonzini
Il 08/07/2014 06:30, Bandan Das ha scritto: With commit b6b8a1451fc40412c57d1 that introduced vmx_check_nested_events, checks for injectable interrupts happen at different points in time for L1 and L2 that could potentially cause a race. The regression occurs because KVM_REQ_EVENT is always set

[PATCH] KVM: x86: Check for nested events if there is an injectable interrupt

2014-07-07 Thread Bandan Das
With commit b6b8a1451fc40412c57d1 that introduced vmx_check_nested_events, checks for injectable interrupts happen at different points in time for L1 and L2 that could potentially cause a race. The regression occurs because KVM_REQ_EVENT is always set when nested_run_pending is set even if

[PATCH] KVM: x86: Check for nested events if there is an injectable interrupt

2014-07-07 Thread Bandan Das
With commit b6b8a1451fc40412c57d1 that introduced vmx_check_nested_events, checks for injectable interrupts happen at different points in time for L1 and L2 that could potentially cause a race. The regression occurs because KVM_REQ_EVENT is always set when nested_run_pending is set even if

Re: [PATCH] KVM: x86: Check for nested events if there is an injectable interrupt

2014-07-07 Thread Paolo Bonzini
Il 08/07/2014 06:30, Bandan Das ha scritto: With commit b6b8a1451fc40412c57d1 that introduced vmx_check_nested_events, checks for injectable interrupts happen at different points in time for L1 and L2 that could potentially cause a race. The regression occurs because KVM_REQ_EVENT is always set