Re: [PATCH] KVM: x86: Unify cross-vCPU IBPB

From: Sean Christopherson
Date: Wed Mar 26 2025 - 18:42:17 EST


On Wed, Mar 26, 2025, Yosry Ahmed wrote:
> On Wed, Mar 26, 2025 at 01:46:04PM -0700, Sean Christopherson wrote:
> > > @@ -12367,10 +12381,13 @@ void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
> > >
> > > void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)
> > > {
> > > - int idx;
> > > + int idx, cpu;
> > >
> > > kvmclock_reset(vcpu);
> > >
> > > + for_each_possible_cpu(cpu)
> > > + cmpxchg(per_cpu_ptr(&last_vcpu, cpu), vcpu, NULL);
> >
> > It's definitely worth keeping a version of SVM's comment to explaining the cross-CPU
> > nullification.
>
> Good idea. Should I send a new version or will you take care of this as
> well while applying?

I'll fixup when applying.