Re: [PATCH 07/15] KVM: Use dedicated flag to track if KVM is handling an NMI from guest

2021-08-27 Thread Sean Christopherson
On Fri, Aug 27, 2021, Peter Zijlstra wrote: > On Thu, Aug 26, 2021 at 05:57:10PM -0700, Sean Christopherson wrote: > > diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h > > index 5cedc0e8a5d5..4c5ba4128b38 100644 > > --- a/arch/x86/kvm/x86.h > > +++ b/arch/x86/kvm/x86.h > > @@ -395,9 +395,10 @@

Re: [PATCH 07/15] KVM: Use dedicated flag to track if KVM is handling an NMI from guest

2021-08-27 Thread Peter Zijlstra
On Thu, Aug 26, 2021 at 05:57:10PM -0700, Sean Christopherson wrote: > diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h > index 5cedc0e8a5d5..4c5ba4128b38 100644 > --- a/arch/x86/kvm/x86.h > +++ b/arch/x86/kvm/x86.h > @@ -395,9 +395,10 @@ static inline void kvm_unregister_perf_callbacks(void) >

[PATCH 07/15] KVM: Use dedicated flag to track if KVM is handling an NMI from guest

2021-08-26 Thread Sean Christopherson
Add a dedicated flag to detect the case where KVM's PMC overflow callback was originally invoked in response to an NMI that arrived while the guest was running. Using current_vcpu is less precise as IRQs also set current_vcpu (though presumably KVM's callback should not be reached in that case), a