[RFC PATCH 0/3] KVM: SVM: Fix IRQ window inhibit handling

Naveen N Rao (AMD) posted 3 patches 2 months, 2 weeks ago
arch/x86/include/asm/kvm_host.h | 16 +++++++++
arch/x86/kvm/svm/svm.h          |  1 +
arch/x86/kvm/svm/svm.c          | 60 ++++++++++++++++++++-------------
arch/x86/kvm/x86.c              | 45 ++++++++++++++++++++++++-
4 files changed, 98 insertions(+), 24 deletions(-)
[RFC PATCH 0/3] KVM: SVM: Fix IRQ window inhibit handling
Posted by Naveen N Rao (AMD) 2 months, 2 weeks ago
Sean, Paolo,
I have attempted to take the changes discussed in the below thread and 
to convert them into a patch series:
http://lkml.kernel.org/r/Z6JoInXNntIoHLQ8@google.com

I have tried to describe the changes, but the nested aspects would 
definitely need a review to ensure correctness and that all aspects are 
covered there.

None of these patches include patch tags since none were provided in the 
discussion. I have proposed patch trailers on the individual patches.  
Please take a look and let me know if that's fine.

I tested this lightly with nested guests as well and it is working fine 
for me.


Thanks,
Naveen


Naveen N Rao (AMD) (3):
  KVM: SVM: Fix clearing IRQ window inhibit with nested guests
  KVM: SVM: Fix IRQ window inhibit handling across multiple vCPUs
  KVM: SVM: Optimize IRQ window inhibit handling

 arch/x86/include/asm/kvm_host.h | 16 +++++++++
 arch/x86/kvm/svm/svm.h          |  1 +
 arch/x86/kvm/svm/svm.c          | 60 ++++++++++++++++++++-------------
 arch/x86/kvm/x86.c              | 45 ++++++++++++++++++++++++-
 4 files changed, 98 insertions(+), 24 deletions(-)


base-commit: 87198fb0208a774d0cb8844744c67ee8680eafab
-- 
2.50.1
Re: [RFC PATCH 0/3] KVM: SVM: Fix IRQ window inhibit handling
Posted by Naveen N Rao 3 weeks, 6 days ago
On Fri, Jul 18, 2025 at 12:13:33PM +0530, Naveen N Rao (AMD) wrote:
> Sean, Paolo,
> I have attempted to take the changes discussed in the below thread and 
> to convert them into a patch series:
> http://lkml.kernel.org/r/Z6JoInXNntIoHLQ8@google.com
> 
> I have tried to describe the changes, but the nested aspects would 
> definitely need a review to ensure correctness and that all aspects are 
> covered there.
> 
> None of these patches include patch tags since none were provided in the 
> discussion. I have proposed patch trailers on the individual patches.  
> Please take a look and let me know if that's fine.
> 
> I tested this lightly with nested guests as well and it is working fine 
> for me.

Sean, Paolo,
Any feedback on this - can you please take a look?


Thanks,
Naveen
Re: [RFC PATCH 0/3] KVM: SVM: Fix IRQ window inhibit handling
Posted by Sean Christopherson 3 weeks, 5 days ago
On Tue, Sep 09, 2025, Naveen N Rao wrote:
> On Fri, Jul 18, 2025 at 12:13:33PM +0530, Naveen N Rao (AMD) wrote:
> > Sean, Paolo,
> > I have attempted to take the changes discussed in the below thread and 
> > to convert them into a patch series:
> > http://lkml.kernel.org/r/Z6JoInXNntIoHLQ8@google.com
> > 
> > I have tried to describe the changes, but the nested aspects would 
> > definitely need a review to ensure correctness and that all aspects are 
> > covered there.
> > 
> > None of these patches include patch tags since none were provided in the 
> > discussion. I have proposed patch trailers on the individual patches.  
> > Please take a look and let me know if that's fine.
> > 
> > I tested this lightly with nested guests as well and it is working fine 
> > for me.
> 
> Sean, Paolo,
> Any feedback on this - can you please take a look?

I'm getting there, slowly.  Lot's of time sensitive things in flight right now
both internally and upstream.  Sorry.
Re: [RFC PATCH 0/3] KVM: SVM: Fix IRQ window inhibit handling
Posted by Naveen N Rao 3 weeks, 5 days ago
On Tue, Sep 09, 2025 at 08:34:22AM -0700, Sean Christopherson wrote:
> On Tue, Sep 09, 2025, Naveen N Rao wrote:
> > On Fri, Jul 18, 2025 at 12:13:33PM +0530, Naveen N Rao (AMD) wrote:
> > > Sean, Paolo,
> > > I have attempted to take the changes discussed in the below thread and 
> > > to convert them into a patch series:
> > > http://lkml.kernel.org/r/Z6JoInXNntIoHLQ8@google.com
> > > 
> > > I have tried to describe the changes, but the nested aspects would 
> > > definitely need a review to ensure correctness and that all aspects are 
> > > covered there.
> > > 
> > > None of these patches include patch tags since none were provided in the 
> > > discussion. I have proposed patch trailers on the individual patches.  
> > > Please take a look and let me know if that's fine.
> > > 
> > > I tested this lightly with nested guests as well and it is working fine 
> > > for me.
> > 
> > Sean, Paolo,
> > Any feedback on this - can you please take a look?
> 
> I'm getting there, slowly.  Lot's of time sensitive things in flight right now
> both internally and upstream.  Sorry.

Sure, no worries. I primarily asked since this is a fix, and we have had 
a few reports of performance degradation due to the APICv inhibit lock.  
So, it would be good if this can be addressed sooner (compared to some 
of the other AVIC features).

Thanks,
Naveen