diff options
| author | Wang Yechao <wang.yechao255@zte.com.cn> | 2026-07-31 17:12:09 +0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-08-01 11:56:19 +0530 |
| commit | c67573b37c3522be2841d4530c1729c37ea89dcb (patch) | |
| tree | f72177343a3c4b756a8ff052e3e7694cf00b7230 | |
| parent | 6854a0f4d9bee9f0fa51dfc3898ce1e6d88b05a8 (diff) | |
| download | linux-next-c67573b37c3522be2841d4530c1729c37ea89dcb.tar.gz linux-next-c67573b37c3522be2841d4530c1729c37ea89dcb.zip | |
RISC-V: KVM: Split huge pages during KVM_CLEAR_DIRTY_LOG
Split huge pages on the range specified using KVM_CLEAR_DIRTY_LOG.
And do not split when enabling dirty logging if
KVM_DIRTY_LOG_INITIALLY_SET is set.
Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260731091215.1549430-5-wang.yechao255@zte.com.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
| -rw-r--r-- | arch/riscv/kvm/mmu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/kvm/mmu.c b/arch/riscv/kvm/mmu.c index b8c22d507c93..9ae10f5b2984 100644 --- a/arch/riscv/kvm/mmu.c +++ b/arch/riscv/kvm/mmu.c @@ -168,6 +168,9 @@ void kvm_arch_mmu_enable_log_dirty_pt_masked(struct kvm *kvm, kvm_riscv_gstage_wp_range(&gstage, start, end); + if (kvm_dirty_log_manual_protect_and_init_set(kvm)) + mmu_split_huge_pages(&gstage, start, end); + /* * Remote TLB flush is not needed here since callers of * kvm_arch_mmu_enable_log_dirty_pt_masked() already do it. |
