Re: [PATCH v2 1/4] KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit

2021-01-07 Thread Sean Christopherson
On Thu, Jan 07, 2021, Paolo Bonzini wrote: > On 07/01/21 18:00, Sean Christopherson wrote: > > Ugh, I assume this is due to one of the "premature" > > nested_ops->check_events() > > calls that are necessitated by the event mess? I'm guessing > > kvm_vcpu_running() > > is the culprit? > > > > If

Re: [PATCH v2 1/4] KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit

2021-01-07 Thread Maxim Levitsky
On Thu, 2021-01-07 at 18:51 +0100, Paolo Bonzini wrote: > On 07/01/21 18:00, Sean Christopherson wrote: > > Ugh, I assume this is due to one of the "premature" > > nested_ops->check_events() > > calls that are necessitated by the event mess? I'm guessing > > kvm_vcpu_running() > > is the culprit

Re: [PATCH v2 1/4] KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit

2021-01-07 Thread Paolo Bonzini
On 07/01/21 18:51, Paolo Bonzini wrote: On 07/01/21 18:00, Sean Christopherson wrote: Ugh, I assume this is due to one of the "premature" nested_ops->check_events() calls that are necessitated by the event mess?  I'm guessing kvm_vcpu_running() is the culprit? If my assumption is correct, thi

Re: [PATCH v2 1/4] KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit

2021-01-07 Thread Paolo Bonzini
On 07/01/21 18:00, Sean Christopherson wrote: Ugh, I assume this is due to one of the "premature" nested_ops->check_events() calls that are necessitated by the event mess? I'm guessing kvm_vcpu_running() is the culprit? If my assumption is correct, this bug affects nVMX as well. Yes, though i

Re: [PATCH v2 1/4] KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit

2021-01-07 Thread Sean Christopherson
On Thu, Jan 07, 2021, Maxim Levitsky wrote: > It is possible to exit the nested guest mode, entered by > svm_set_nested_state prior to first vm entry to it (e.g due to pending event) > if the nested run was not pending during the migration. Ugh, I assume this is due to one of the "premature" neste

[PATCH v2 1/4] KVM: nSVM: cancel KVM_REQ_GET_NESTED_STATE_PAGES on nested vmexit

2021-01-07 Thread Maxim Levitsky
It is possible to exit the nested guest mode, entered by svm_set_nested_state prior to first vm entry to it (e.g due to pending event) if the nested run was not pending during the migration. In this case we must not switch to the nested msr permission bitmap. Also add a warning to catch similar ca