From: Takahiro Itazuri <itazur@amazon.com>
To: <seanjc@google.com>
Cc: <david@kernel.org>, <dwmw2@infradead.org>, <itazur@amazon.com>,
<jackmanb@google.com>, <kalyazin@amazon.com>,
<kvm@vger.kernel.org>, <patrick.roy@campus.lmu.de>,
<pbonzini@redhat.com>, <pdurrant@amazon.com>, <tabba@google.com>,
<vkuznets@redhat.com>, <zulinx86@gmail.com>
Subject: Re: [RFC PATCH v3 3/6] KVM: Rename invalidate_begin to invalidate_start for consistency
Date: Thu, 12 Mar 2026 14:17:06 +0000 [thread overview]
Message-ID: <20260312141724.9775-1-itazur@amazon.com> (raw)
In-Reply-To: <abHWLDvJcWlQOdYh@google.com>
On Wed, 11 Mar 2026 13:53:00 -0700, Sean Christopherson wrote:
> On Tue, Mar 10, 2026, Takahiro Itazuri wrote:
> > Most MMU-related helpers use "_start" suffix. Align with the prevailing
> > naming convention for consistency across MMU-related codebase.
> >
> > ```
> > $ git grep -E "invalidate(_range)?_start" | wc -l
> > 123
> >
> > $ git grep -E "invalidate(_range)?_begin" | wc -l
> > 14
> > ```
>
> I'm a-ok with the change, but the changelog should make it clear to what KVM is
> conforming. Very specifically, IMO, all that really matters here is aligning with
> mmu_notifier_ops.invalidate_range_start().
>
> Because for me, "MMU-related" anything in the context of KVM means just that,
> KVM's MMU code. I don't care what other MMU-related code outside of KVM uses for
> naming, if that code doesn't interact with KVM in any way. And for KVM specifically,
> it's a much closer race.
>
> $ git grep -E "invalidate(_range)?_begin" **/kvm | wc -l
> 11
> $ git grep -E "invalidate(_range)?_start" **/kvm | wc -l
> 16
>
> But as above, I'm definitely in favor of matching mmu_notifier_ops.invalidate_range_start().
Fair enough. I'll update the commit message as you suggested!
On Wed, 11 Mar 2026 13:53:00 -0700, Sean Christopherson wrote:
> > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> > index 2ea5d2f172f7..618a71894ed1 100644
> > --- a/include/linux/kvm_host.h
> > +++ b/include/linux/kvm_host.h
> > @@ -1566,7 +1566,7 @@ void kvm_mmu_free_memory_cache(struct kvm_mmu_memory_cache *mc);
> > void *kvm_mmu_memory_cache_alloc(struct kvm_mmu_memory_cache *mc);
> > #endif
> >
> > -void kvm_mmu_invalidate_begin(struct kvm *kvm);
> > +void kvm_mmu_invalidate_start(struct kvm *kvm);
> > void kvm_mmu_invalidate_range_add(struct kvm *kvm, gfn_t start, gfn_t end);
> > void kvm_mmu_invalidate_end(struct kvm *kvm);
> > bool kvm_mmu_unmap_gfn_range(struct kvm *kvm, struct kvm_gfn_range *range);
> > diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
> > index d1094c2d5fb6..8ecf36a84e3b 100644
> > --- a/include/linux/mmu_notifier.h
> > +++ b/include/linux/mmu_notifier.h
> > @@ -134,8 +134,8 @@ struct mmu_notifier_ops {
> > * Invalidation of multiple concurrent ranges may be
> > * optionally permitted by the driver. Either way the
> > * establishment of sptes is forbidden in the range passed to
> > - * invalidate_range_begin/end for the whole duration of the
> > - * invalidate_range_begin/end critical section.
> > + * invalidate_range_start/end for the whole duration of the
> > + * invalidate_range_start/end critical section.
> > *
> > * invalidate_range_start() is called when all pages in the
> > * range are still mapped and have at least a refcount of one.
>
> Please move the include/linux/mmu_notifier.h change to its own standalone patch,
> as in, not even part of this series. It's an obviously correct change (the comment
> has been wrong since commit cddb8a5c14aa ("mmu-notifiers: core")) and has nothing
> to do with KVM.
You're right. I'll exclude it from this series.
next prev parent reply other threads:[~2026-03-12 14:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 6:36 [RFC PATCH v3 0/6] KVM: pfncache: Add guest_memfd support to pfncache Takahiro Itazuri
2026-03-10 6:41 ` [RFC PATCH v3 1/6] KVM: pfncache: Resolve PFNs via kvm_gmem_get_pfn() for gmem-backed GPAs Takahiro Itazuri
2026-03-10 6:43 ` [RFC PATCH v3 2/6] KVM: pfncache: Obtain KHVA via vmap() for gmem with NO_DIRECT_MAP Takahiro Itazuri
2026-03-10 6:43 ` [RFC PATCH v3 3/6] KVM: Rename invalidate_begin to invalidate_start for consistency Takahiro Itazuri
2026-03-11 20:53 ` Sean Christopherson
2026-03-12 14:17 ` Takahiro Itazuri [this message]
2026-03-10 6:43 ` [RFC PATCH v3 4/6] KVM: pfncache: Rename invalidate_start() helper Takahiro Itazuri
2026-03-10 6:44 ` [RFC PATCH v3 5/6] KVM: Rename mn_* invalidate-related fields to generic ones Takahiro Itazuri
2026-03-11 20:57 ` Sean Christopherson
2026-03-12 14:33 ` Takahiro Itazuri
2026-03-10 6:44 ` [RFC PATCH v3 6/6] KVM: pfncache: Invalidate on gmem invalidation and memattr updates Takahiro Itazuri
2026-03-11 12:04 ` [RFC PATCH v3 0/6] KVM: pfncache: Add guest_memfd support to pfncache David Woodhouse
2026-03-12 14:02 ` [RFC PATCH v3 0/6] KVM: pfncache: Add guest_memfd support to Takahiro Itazuri
2026-03-11 22:32 ` [RFC PATCH v3 0/6] KVM: pfncache: Add guest_memfd support to pfncache 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=20260312141724.9775-1-itazur@amazon.com \
--to=itazur@amazon.com \
--cc=david@kernel.org \
--cc=dwmw2@infradead.org \
--cc=jackmanb@google.com \
--cc=kalyazin@amazon.com \
--cc=kvm@vger.kernel.org \
--cc=patrick.roy@campus.lmu.de \
--cc=pbonzini@redhat.com \
--cc=pdurrant@amazon.com \
--cc=seanjc@google.com \
--cc=tabba@google.com \
--cc=vkuznets@redhat.com \
--cc=zulinx86@gmail.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.