]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RISC-V: KVM: Fix skip of valid pages in kvm_riscv_gstage_unmap_range
authorWu Fei <wu.fei9@sanechips.com.cn>
Thu, 4 Jun 2026 23:03:15 +0000 (07:03 +0800)
committerAnup Patel <anup@brainfault.org>
Sun, 7 Jun 2026 06:11:43 +0000 (11:41 +0530)
commita5f8307e2eaaf5d3acae6554d84fcd2683613cc4
tree62ac9da136a95a677669e3ceba544f0f12335899
parent0d9dc20842dbe0a9c66be9bb1638f3e221d87bb0
RISC-V: KVM: Fix skip of valid pages in kvm_riscv_gstage_unmap_range

Same as kvm_riscv_gstage_wp_range, the possible valid pages should not
be skipped if !found_leaf. Different from wp case, which can
write-protect more than asked, unmap can't do that, no splitting is
added right now but a warning is logged instead.

Signed-off-by: Wu Fei <wu.fei9@sanechips.com.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260604230317.30501-3-atwufei@163.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/gstage.c