Re: [PATCH] KVM: SVM: fix calls to is_intercept

2020-06-09 Thread Paolo Bonzini
On 09/06/20 09:30, Maxim Levitsky wrote: > And if I understand correctly that bug didn't affect anything I tested > because your recent patches started to avoid the usage of the interrupt > window unless L1 clears the usage of the interrupt intercept which is > rare. > > Looks correct to me, and I

Re: [PATCH] KVM: SVM: fix calls to is_intercept

2020-06-09 Thread Maxim Levitsky
On Mon, 2020-06-08 at 14:51 +0200, Vitaly Kuznetsov wrote: > Paolo Bonzini writes: > > > is_intercept takes an INTERCEPT_* constant, not SVM_EXIT_*; because > > of this, the compiler was removing the body of the conditionals, > > as if is_intercept returned 0. > > > > This unveils a latent bug:

Re: [PATCH] KVM: SVM: fix calls to is_intercept

2020-06-08 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > is_intercept takes an INTERCEPT_* constant, not SVM_EXIT_*; because > of this, the compiler was removing the body of the conditionals, > as if is_intercept returned 0. > > This unveils a latent bug: when clearing the VINTR intercept, > int_ctl must also be changed in the L

[PATCH] KVM: SVM: fix calls to is_intercept

2020-06-08 Thread Paolo Bonzini
is_intercept takes an INTERCEPT_* constant, not SVM_EXIT_*; because of this, the compiler was removing the body of the conditionals, as if is_intercept returned 0. This unveils a latent bug: when clearing the VINTR intercept, int_ctl must also be changed in the L1 VMCB (svm->nested.hsave), just li