From: "Huang, Kai" <kai.huang@intel.com>
To: "seanjc@google.com" <seanjc@google.com>,
"yosry@kernel.org" <yosry@kernel.org>
Cc: "jmattson@google.com" <jmattson@google.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] KVM: nVMX: Always flush vpid02 on first use
Date: Wed, 17 Jun 2026 22:37:30 +0000 [thread overview]
Message-ID: <599ad9edcf9817fb1c4c37aac135e9d83c408306.camel@intel.com> (raw)
In-Reply-To: <ajMfH1kWnzFuHJoU@google.com>
On Wed, 2026-06-17 at 15:26 -0700, Sean Christopherson wrote:
> > > 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.
>
> You're not missing anything. It's just that putting it in free_nested() subtly
> relies on zero-allocating vmx->nested, so that the *very* first use also flushes
> vpid02. Relying on zero-allocating is generally a-ok, but in this case it would
> require documenting the same base logic in multiple places.
Right. Agreed.
next prev parent reply other threads:[~2026-06-17 22:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 21:46 [PATCH 0/3] KVM: nVMX: A few TLB flushing fixes Yosry Ahmed
2026-06-16 21:46 ` [PATCH 1/3] KVM: nVMX: Always flush vpid02 on first use Yosry Ahmed
2026-06-16 22:25 ` Jim Mattson
2026-06-17 11:30 ` Huang, Kai
2026-06-17 13:03 ` Sean Christopherson
2026-06-17 22:03 ` Huang, Kai
2026-06-17 22:04 ` Yosry Ahmed
2026-06-17 22:08 ` Huang, Kai
2026-06-17 22:09 ` Yosry Ahmed
2026-06-17 22:26 ` Sean Christopherson
2026-06-17 22:37 ` Huang, Kai [this message]
2026-06-16 21:46 ` [PATCH 2/3] KVM: nVMX: Decouple INVVPID operand checks from flushing of vpid02 Yosry Ahmed
2026-06-18 10:57 ` Huang, Kai
2026-06-18 15:59 ` Yosry Ahmed
2026-06-16 21:46 ` [PATCH 3/3] KVM: nVM: Ensure INVVPID is emulated on the correct physical CPU Yosry Ahmed
2026-06-18 11:00 ` Huang, Kai
2026-07-14 18:41 ` [PATCH 0/3] KVM: nVMX: A few TLB flushing fixes Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=599ad9edcf9817fb1c4c37aac135e9d83c408306.camel@intel.com \
--to=kai.huang@intel.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=stable@vger.kernel.org \
--cc=yosry@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®