All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jun Miao <jun.miao@intel.com>
To: pbonzini@redhat.com, seanjc@google.com
Cc: linux-kernel@vger.kernel.org, jun.miao@intel.com
Subject: [PATCH] KVM: Fix stale gfn_to_pfn() reference in kvm_invalidate_memslot() comment
Date: Fri,  8 May 2026 14:01:39 +0800	[thread overview]
Message-ID: <20260508060139.850444-1-jun.miao@intel.com> (raw)

Commit 06cdaff80e50 ("KVM: Drop gfn_to_pfn() APIs now that all users are
gone") removed gfn_to_pfn(), but kvm_invalidate_memslot() still references
gfn_to_pfn() when describing how sp->gfn is validated for guest memory
accesses.

Update the comment to reference __kvm_faultin_pfn(), which is the actual path
involved here.

No functional change intended.

Fixes: 06cdaff80e50 ("KVM: Drop gfn_to_pfn() APIs now that all users are gone")
Signed-off-by: Jun Miao <jun.miao@intel.com>
---
 virt/kvm/kvm_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 89489996fbc1..f4b3ea970a78 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -1818,7 +1818,7 @@ static void kvm_invalidate_memslot(struct kvm *kvm,
 	/*
 	 * From this point no new shadow pages pointing to a deleted, or moved,
 	 * memslot will be created.  Validation of sp->gfn happens in:
-	 *	- gfn_to_hva (kvm_read_guest, gfn_to_pfn)
+	 *	- gfn_to_hva (kvm_read_guest, __kvm_faultin_pfn)
 	 *	- kvm_is_visible_gfn (mmu_check_root)
 	 */
 	kvm_arch_flush_shadow_memslot(kvm, old);
-- 
2.43.0


             reply	other threads:[~2026-05-08  6:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08  6:01 Jun Miao [this message]
2026-05-15 13:10 ` [PATCH] KVM: Fix stale gfn_to_pfn() reference in kvm_invalidate_memslot() comment 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=20260508060139.850444-1-jun.miao@intel.com \
    --to=jun.miao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.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.