Re: [PATCH 1/3] KVM: nVMX: Always flush vpid02 on first use
From: Yosry Ahmed
Date: Wed Jun 17 2026 - 18:09:44 EST
> > > I think you mean the "actual flush" needs to be done on the first use. But
> > > setting last_vpid to 0 is a setting which is to make sure the actual flush will
> > > always be done on the first use, i.e., the actual flush will always be done on
> > > the first use. For this purpose seems to me there's no difference between
> > > setting last_vpid to 0 in enter_vmx_operation() and free_nested(), but maybe I
> > > am missing something.
> > >
> > > But I guess doing it in enter_vmx_operation() matches the logic of "doing actual
> > > flush on first use" more :-)
> >
> > Yup. I thought about putting it free_nested() as it looks like
> > cleanup, but semantically it makes more sense to put it in
> > enter_vmx_operation().
>
> Sounds good to me. :-)
Thanks for taking a look and reviewing!