Re: [PATCH 2/2] KVM: nVMX: fix for disappearing L1->L2 event injection on L1 migration

2021-01-07 Thread Maxim Levitsky
On Thu, 2021-01-07 at 04:38 +0200, Maxim Levitsky wrote: > On Wed, 2021-01-06 at 10:17 -0800, Sean Christopherson wrote: > > On Wed, Jan 06, 2021, Maxim Levitsky wrote: > > > If migration happens while L2 entry with an injected event to L2 is > > > pending, > > > we weren't including the event in

Re: [PATCH 2/2] KVM: nVMX: fix for disappearing L1->L2 event injection on L1 migration

2021-01-06 Thread Maxim Levitsky
On Wed, 2021-01-06 at 10:17 -0800, Sean Christopherson wrote: > On Wed, Jan 06, 2021, Maxim Levitsky wrote: > > If migration happens while L2 entry with an injected event to L2 is pending, > > we weren't including the event in the migration state and it would be > > lost leading to L2 hang. > > Bu

Re: [PATCH 2/2] KVM: nVMX: fix for disappearing L1->L2 event injection on L1 migration

2021-01-06 Thread Sean Christopherson
On Wed, Jan 06, 2021, Maxim Levitsky wrote: > If migration happens while L2 entry with an injected event to L2 is pending, > we weren't including the event in the migration state and it would be > lost leading to L2 hang. But the injected event should still be in vmcs12 and KVM_STATE_NESTED_RUN_P

[PATCH 2/2] KVM: nVMX: fix for disappearing L1->L2 event injection on L1 migration

2021-01-06 Thread Maxim Levitsky
If migration happens while L2 entry with an injected event to L2 is pending, we weren't including the event in the migration state and it would be lost leading to L2 hang. Fix this by queueing the injected event in similar manner to how we queue interrupted injections. This can be reproduced by r