Re: [RFC PATCH 2/3] KVM: SVM: Fix IRQ window inhibit handling across multiple vCPUs

From: Sean Christopherson

Date: Wed Jan 14 2026 - 15:19:56 EST


On Wed, Jan 14, 2026, Sean Christopherson wrote:
> Finally mustered up the brainpower to land this series :-)
>
> On Fri, Jul 18, 2025, Naveen N Rao (AMD) wrote:
> > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> > index f19a76d3ca0e..b781b4f1d304 100644
> > --- a/arch/x86/include/asm/kvm_host.h
> > +++ b/arch/x86/include/asm/kvm_host.h
> > @@ -1395,6 +1395,10 @@ struct kvm_arch {
> > struct kvm_pit *vpit;
> > #endif
> > atomic_t vapics_in_nmi_mode;
> > +
> > + /* Keep this in a cacheline separate from apicv_update_lock */
>
> A comment won't suffice. To isolate what we want to isolate, tag things with
> __aligned(). Ideally we would use __cacheline_aligned_in_smp, but AFAIK that
> can't be used within a struct as it uses .section tags, :-(

Gah, finally found what I was looking for: ____cacheline_aligned