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: Kexin Sun --- 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 7c8143e79c12..1a9ed6f56a1b 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