Re: [PATCH 2/3] KVM: nVMX: Fix conditions for NMI and interrupt injection

2013-03-14 Thread Jan Kiszka
On 2013-03-14 16:37, Gleb Natapov wrote: > On Thu, Mar 14, 2013 at 04:24:18PM +0100, Jan Kiszka wrote: >> On 2013-03-14 16:12, Gleb Natapov wrote: >>> On Wed, Mar 13, 2013 at 05:53:45PM +0100, Jan Kiszka wrote: If we are in guest mode, L0 can only inject events into L2 if L1 has nothing p

Re: [PATCH 2/3] KVM: nVMX: Fix conditions for NMI and interrupt injection

2013-03-14 Thread Gleb Natapov
On Thu, Mar 14, 2013 at 04:24:18PM +0100, Jan Kiszka wrote: > On 2013-03-14 16:12, Gleb Natapov wrote: > > On Wed, Mar 13, 2013 at 05:53:45PM +0100, Jan Kiszka wrote: > >> If we are in guest mode, L0 can only inject events into L2 if L1 has > >> nothing pending. Otherwise, L0 would overwrite L1's e

Re: [PATCH 2/3] KVM: nVMX: Fix conditions for NMI and interrupt injection

2013-03-14 Thread Jan Kiszka
On 2013-03-14 14:59, Gleb Natapov wrote: > On Wed, Mar 13, 2013 at 05:53:45PM +0100, Jan Kiszka wrote: >> If we are in guest mode, L0 can only inject events into L2 if L1 has >> nothing pending. Otherwise, L0 would overwrite L1's events and they >> would get lost. This check is conceptually indepen

Re: [PATCH 2/3] KVM: nVMX: Fix conditions for NMI and interrupt injection

2013-03-14 Thread Jan Kiszka
On 2013-03-14 16:12, Gleb Natapov wrote: > On Wed, Mar 13, 2013 at 05:53:45PM +0100, Jan Kiszka wrote: >> If we are in guest mode, L0 can only inject events into L2 if L1 has >> nothing pending. Otherwise, L0 would overwrite L1's events and they >> would get lost. This check is conceptually indepen

Re: [PATCH 2/3] KVM: nVMX: Fix conditions for NMI and interrupt injection

2013-03-14 Thread Gleb Natapov
On Wed, Mar 13, 2013 at 05:53:45PM +0100, Jan Kiszka wrote: > If we are in guest mode, L0 can only inject events into L2 if L1 has > nothing pending. Otherwise, L0 would overwrite L1's events and they > would get lost. This check is conceptually independent of > nested_exit_on_intr. > > If L1 trap

Re: [PATCH 2/3] KVM: nVMX: Fix conditions for NMI and interrupt injection

2013-03-14 Thread Gleb Natapov
On Wed, Mar 13, 2013 at 05:53:45PM +0100, Jan Kiszka wrote: > If we are in guest mode, L0 can only inject events into L2 if L1 has > nothing pending. Otherwise, L0 would overwrite L1's events and they > would get lost. This check is conceptually independent of > nested_exit_on_intr. > > If L1 trap

[PATCH 2/3] KVM: nVMX: Fix conditions for NMI and interrupt injection

2013-03-13 Thread Jan Kiszka
If we are in guest mode, L0 can only inject events into L2 if L1 has nothing pending. Otherwise, L0 would overwrite L1's events and they would get lost. This check is conceptually independent of nested_exit_on_intr. If L1 traps external interrupts, then we also need to look at L1's idt_vectoring_i