Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Ackerley Tng <ackerleytng@google.com>
Cc: Takahiro Itazuri <itazur@amazon.com>,
	kvm@vger.kernel.org,  Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Fuad Tabba <tabba@google.com>,
	 Brendan Jackman <jackmanb@google.com>,
	David Hildenbrand <david@kernel.org>,
	 David Woodhouse <dwmw2@infradead.org>,
	Paul Durrant <pdurrant@amazon.com>,
	 Nikita Kalyazin <nikita.kalyazin@linux.dev>,
	Patrick Roy <patrick.roy@campus.lmu.de>,
	 Patrick Roy <patrick.roy@linux.dev>,
	Derek Manwaring <derekmn@amazon.com>,
	 Alina Cernea <acernea@amazon.com>,
	Michael Zoumboulakis <zoumboul@amazon.com>,
	 Takahiro Itazuri <zulinx86@gmail.com>
Subject: Re: [RFC PATCH v4 4/7] KVM: pfncache: Rename invalidate_start() helper
Date: Tue, 12 May 2026 15:14:50 -0700	[thread overview]
Message-ID: <agOmWmxXlgq7Dtnn@google.com> (raw)
In-Reply-To: <CAEvNRgGvjD7TtyHKm==55XaTQtSPCTyF89c-UROe5Q=yXEjtpw@mail.gmail.com>

On Fri, May 01, 2026, Ackerley Tng wrote:
> Takahiro Itazuri <itazur@amazon.com> writes:
> 
> > Rename gfn_to_pfn_cache_invalidate_start() to
> > gpc_invalidate_hva_range_start() to explicitly indicate that it takes a
> > range of HVA range.
> >
> > No functional changes intended.
> >
> > Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
> > ---
> >  virt/kvm/kvm_main.c |  2 +-
> >  virt/kvm/kvm_mm.h   | 12 ++++++------
> >  virt/kvm/pfncache.c |  4 ++--
> >  3 files changed, 9 insertions(+), 9 deletions(-)
> >
> > diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> > index 5871882ff1db..d64e70f8e8e3 100644
> > --- a/virt/kvm/kvm_main.c
> > +++ b/virt/kvm/kvm_main.c
> > @@ -763,7 +763,7 @@ static int kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn,
> >  	 * mn_active_invalidate_count (see above) instead of
> >  	 * mmu_invalidate_in_progress.
> >  	 */
> > -	gfn_to_pfn_cache_invalidate_start(kvm, range->start, range->end);
> > +	gpc_invalidate_hva_range_start(kvm, range->start, range->end);
> 
> Is this actually not specific to the start? It may be called from the
> MMU notifier's .invalidate_range_start hook, but since we're renaming
> it, perhaps just gpc_invalidate_hva_range() would be more suitable.

Before we touch this name, we need to bottom out on optimizing gpc invalidation,
because odds are good the behavior and thus the "best" name could end up being
quite different.

https://lore.kernel.org/all/ZrJIA6t8S9Ucjqzn@google.com

  reply	other threads:[~2026-05-12 22:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 15:46 [RFC PATCH v4 0/7] KVM: pfncache: Add guest_memfd support to pfncache Takahiro Itazuri
2026-04-20 15:46 ` [RFC PATCH v4 1/7] KVM: pfncache: Resolve PFNs via kvm_gmem_get_pfn() for gmem-backed GPAs Takahiro Itazuri
2026-04-20 15:46 ` [RFC PATCH v4 2/7] KVM: pfncache: Obtain KHVA via vmap() for gmem with NO_DIRECT_MAP Takahiro Itazuri
2026-04-20 15:46 ` [RFC PATCH v4 3/7] KVM: Rename invalidate_begin to invalidate_start for consistency Takahiro Itazuri
2026-04-20 15:46 ` [RFC PATCH v4 4/7] KVM: pfncache: Rename invalidate_start() helper Takahiro Itazuri
2026-05-01 21:38   ` Ackerley Tng
2026-05-12 22:14     ` Sean Christopherson [this message]
2026-04-20 15:46 ` [RFC PATCH v4 5/7] KVM: pfncache: Invalidate on gmem invalidation and memattr updates Takahiro Itazuri
2026-05-01 21:43   ` Ackerley Tng
2026-04-20 15:46 ` [RFC PATCH v4 6/7] KVM: selftests: Test pfncache with gmem-backed memory Takahiro Itazuri
2026-05-01 21:16   ` Ackerley Tng
2026-04-20 15:46 ` [RFC PATCH v4 7/7] KVM: selftests: Test pfncache invalidation for " Takahiro Itazuri
2026-05-12 22:12 ` [RFC PATCH v4 0/7] 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=agOmWmxXlgq7Dtnn@google.com \
    --to=seanjc@google.com \
    --cc=acernea@amazon.com \
    --cc=ackerleytng@google.com \
    --cc=david@kernel.org \
    --cc=derekmn@amazon.com \
    --cc=dwmw2@infradead.org \
    --cc=itazur@amazon.com \
    --cc=jackmanb@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=nikita.kalyazin@linux.dev \
    --cc=patrick.roy@campus.lmu.de \
    --cc=patrick.roy@linux.dev \
    --cc=pbonzini@redhat.com \
    --cc=pdurrant@amazon.com \
    --cc=tabba@google.com \
    --cc=vkuznets@redhat.com \
    --cc=zoumboul@amazon.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox