]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
LoongArch: KVM: Use kvm_set_pte() in kvm_flush_pte()
authorTao Cui <cuitao@kylinos.cn>
Mon, 4 May 2026 01:00:38 +0000 (09:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 May 2026 13:31:19 +0000 (15:31 +0200)
commit 81e18777d61440511451866c7c80b34a8bdd6b33 upstream.

kvm_flush_pte() is the only caller that directly assigns *pte instead
of using the kvm_set_pte() wrapper. Use the wrapper for consistency with
the rest of the file.

No functional change intended.

Cc: stable@vger.kernel.org
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Tao Cui <cuitao@kylinos.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/loongarch/kvm/mmu.c

index a7fa458e33605e31929260edf651f2d8158d74e6..e104897aa532855b2e007ffd659135772780f6a4 100644 (file)
@@ -95,7 +95,7 @@ static int kvm_flush_pte(kvm_pte_t *pte, phys_addr_t addr, kvm_ptw_ctx *ctx)
        else
                kvm->stat.pages--;
 
-       *pte = ctx->invalid_entry;
+       kvm_set_pte(pte, ctx->invalid_entry);
 
        return 1;
 }