]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RISC-V: KVM: Avoid re-acquiring memslot in kvm_riscv_gstage_map()
authorQuan Zhou <zhouquan@iscas.ac.cn>
Wed, 11 Jun 2025 09:51:40 +0000 (17:51 +0800)
committerAnup Patel <anup@brainfault.org>
Mon, 28 Jul 2025 16:58:31 +0000 (22:28 +0530)
commit07a289a031404ec583c01d8e87680d434fc62c1f
tree59b70c42c2cef0f21f71a0789c18ea864a5a3cc9
parentfce11b667022766087db8b47deb757fd3c9e8863
RISC-V: KVM: Avoid re-acquiring memslot in kvm_riscv_gstage_map()

The caller has already passed in the memslot, and there are
two instances `{kvm_faultin_pfn/mark_page_dirty}` of retrieving
the memslot again in `kvm_riscv_gstage_map`, we can replace them
with `{__kvm_faultin_pfn/mark_page_dirty_in_slot}`.

Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/50989f0a02790f9d7dc804c2ade6387c4e7fbdbc.1749634392.git.zhouquan@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/mmu.c