From: kexinsun <kexinsun@smail.nju.edu.cn>
To: zhaotianrui@loongson.cn
Cc: maobibo@loongson.cn, chenhuacai@kernel.org, kernel@xen0n.name,
tsbogend@alpha.franken.de, kvm@vger.kernel.org,
loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mips@vger.kernel.org, julia.lawall@inria.fr,
xutong.ma@inria.fr, yunbolyu@smu.edu.sg, ratnadiraw@smu.edu.sg,
kexinsun@smail.nju.edu.cn
Subject: [PATCH] KVM: MIPS/LoongArch: Fix typo in pfn_to_pfn_prot comments
Date: Tue, 24 Feb 2026 11:04:53 +0800 [thread overview]
Message-ID: <20260224030453.2311-1-kexinsun@smail.nju.edu.cn> (raw)
The comments in arch/{mips,loongarch}/kvm/mmu.c refer to a non-existent
function "pfn_to_pfn_prot". This is a historical typo.
In MIPS, it was introduced in commit 411740f5422a ("KVM: MIPS/MMU:
Implement KVM_CAP_SYNC_MMU") where the actual function being called was
`gfn_to_pfn_prot`.
(see `pfn = gfn_to_pfn_prot(kvm, gfn, write, &writeable);`).
This was later replaced by `kvm_faultin_pfn()` in commit 7e8f1aa59d0b
("KVM: MIPS: Use kvm_faultin_pfn() to map pfns into the guest").
The LoongArch code, likely copied from MIPS, inherited this typo upon
its introduction in commit 752e2cd7b4fb ("LoongArch: KVM: Implement
kvm mmu operations"). The actual function call was likewise updated to
`kvm_faultin_pfn()` in commit 14d02b7ff912 ("KVM: LoongArch: Use
kvm_faultin_pfn() to map pfns into the guest").
Update the comments in both files to correctly reference the current
function, `kvm_faultin_pfn`.
No functional change; comments only.
Fixes: 411740f5422a ("KVM: MIPS/MMU: Implement KVM_CAP_SYNC_MMU")
Fixes: 752e2cd7b4fb ("LoongArch: KVM: Implement kvm mmu operations")
Signed-off-by: kexinsun <kexinsun@smail.nju.edu.cn>
---
arch/loongarch/kvm/mmu.c | 2 +-
arch/mips/kvm/mmu.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/loongarch/kvm/mmu.c b/arch/loongarch/kvm/mmu.c
index a7fa458e3360..a3fb6ace4a98 100644
--- a/arch/loongarch/kvm/mmu.c
+++ b/arch/loongarch/kvm/mmu.c
@@ -803,7 +803,7 @@ static int kvm_map_page(struct kvm_vcpu *vcpu, unsigned long gpa, bool write)
retry:
/*
* Used to check for invalidations in progress, of the pfn that is
- * returned by pfn_to_pfn_prot below.
+ * returned by kvm_faultin_pfn() below.
*/
mmu_seq = kvm->mmu_invalidate_seq;
/*
diff --git a/arch/mips/kvm/mmu.c b/arch/mips/kvm/mmu.c
index d2c3b6b41f18..da51707a2366 100644
--- a/arch/mips/kvm/mmu.c
+++ b/arch/mips/kvm/mmu.c
@@ -574,7 +574,7 @@ static int kvm_mips_map_page(struct kvm_vcpu *vcpu, unsigned long gpa,
retry:
/*
* Used to check for invalidations in progress, of the pfn that is
- * returned by pfn_to_pfn_prot below.
+ * returned by kvm_faultin_pfn() below.
*/
mmu_seq = kvm->mmu_invalidate_seq;
/*
--
2.25.1
next reply other threads:[~2026-02-24 3:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 3:04 kexinsun [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-10-26 15:02 [PATCH] KVM: MIPS/LoongArch: Fix typo in pfn_to_pfn_prot comments Kexin Sun
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=20260224030453.2311-1-kexinsun@smail.nju.edu.cn \
--to=kexinsun@smail.nju.edu.cn \
--cc=chenhuacai@kernel.org \
--cc=julia.lawall@inria.fr \
--cc=kernel@xen0n.name \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=maobibo@loongson.cn \
--cc=ratnadiraw@smu.edu.sg \
--cc=tsbogend@alpha.franken.de \
--cc=xutong.ma@inria.fr \
--cc=yunbolyu@smu.edu.sg \
--cc=zhaotianrui@loongson.cn \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).