From: Sean Christopherson <seanjc@google.com>
To: David Matlack <dmatlack@google.com>
Cc: Junaid Shahid <junaids@google.com>,
kvm@vger.kernel.org, pbonzini@redhat.com
Subject: Re: [PATCH] kvm: x86: mmu: Drop the need_remote_flush() function
Date: Mon, 25 Jul 2022 21:43:45 +0000 [thread overview]
Message-ID: <Yt8OkRUYfndOnGrw@google.com> (raw)
In-Reply-To: <Yt7VNt2bsdNtyqZl@google.com>
On Mon, Jul 25, 2022, David Matlack wrote:
> On Fri, Jul 22, 2022 at 07:43:16PM -0700, Junaid Shahid wrote:
> > This is only used by kvm_mmu_pte_write(), which no longer actually
> > creates the new SPTE and instead just clears the old SPTE. So we
> > just need to check if the old SPTE was shadow-present instead of
> > calling need_remote_flush(). Hence we can drop this function. It was
> > incomplete anyway as it didn't take access-tracking into account.
> >
> > This patch should not result in any functional change.
>
> Even if we don't assume anything about the new SPTE, this commit flushes
> TLBs in a superset of the current cases. So this change should
> definitely be safe.
>
> And then if we assume new SPTE is 0 (which it should be), I agree this
> should not result in any functional change.
Nit for posterity, zapped SPTEs don't necessarily have to be '0', e.g. KVM is
more than likely going to use 0x80000000_00000000 as the "zero" value for TDP MMU
SPTEs so that the SUPPRESS_VE is set for "zero"-initialized SPTEs (TDX requires
EPT Violation #VEs be enabled).
> Reviewed-by: David Matlack <dmatlack@google.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
prev parent reply other threads:[~2022-07-25 21:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-23 2:43 [PATCH] kvm: x86: mmu: Drop the need_remote_flush() function Junaid Shahid
2022-07-25 17:39 ` David Matlack
2022-07-25 21:43 ` Sean Christopherson [this message]
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=Yt8OkRUYfndOnGrw@google.com \
--to=seanjc@google.com \
--cc=dmatlack@google.com \
--cc=junaids@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.