Re: [PATCH v3 03/27] KVM: VMX: Generalize VPID allocation to be vendor-neutral

From: Jim Mattson

Date: Fri Oct 16 2026 - 15:40:15 EST


On Wed, Oct 14, 2026 at 1:38 PM Yosry Ahmed <yosry@xxxxxxxxxx> wrote:
>
> On Wed, Oct 14, 2026 at 11:23 AM Jim Mattson <jmattson@xxxxxxxxxx> wrote:
> >
> > On Mon, Oct 12, 2026 at 4:36 PM Yosry Ahmed <yosry@xxxxxxxxxx> wrote:
> > > +static struct {
> > > + spinlock_t lock;
> > > + unsigned long *bitmap;
> > > + unsigned int nr;
> > > +} tlb_tags;
> >
> > Can we statically initialize this to avoid the call to spin_lock_init()?
> >
> > ... tlb_tags = {
> > .lock = __SPIN_LOCK_UNLOCKED(tlb_tags.lock),
> > };
>
> The call to spin_lock_init() is less code, but I can make the change.
> I don't have a preference.

Your call.