diff options
| author | Wang Yechao <wang.yechao255@zte.com.cn> | 2026-02-26 19:12:31 +0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-03-06 11:20:30 +0530 |
| commit | b342166cbcf96a8c846db96529e75dc2d2420d58 (patch) | |
| tree | 6ecfe78a10fb0088cf5c8c14317b2278a966278a | |
| parent | 7120a9d9e0232ad3c661a100973c57328f462b80 (diff) | |
| download | linux-next-b342166cbcf96a8c846db96529e75dc2d2420d58.tar.gz linux-next-b342166cbcf96a8c846db96529e75dc2d2420d58.zip | |
RISC-V: KVM: Skip THP support check during dirty logging
When dirty logging is enabled, guest stage mappings are forced to
PAGE_SIZE granularity. Changing the mapping page size at this point
is incorrect.
Fixes: ed7ae7a34bea ("RISC-V: KVM: Transparent huge page support")
Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260226191231140_X1Juus7s2kgVlc0ZyW_K@zte.com.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
| -rw-r--r-- | arch/riscv/kvm/mmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kvm/mmu.c b/arch/riscv/kvm/mmu.c index 87c8f41482c5..088d33ba90ed 100644 --- a/arch/riscv/kvm/mmu.c +++ b/arch/riscv/kvm/mmu.c @@ -539,7 +539,7 @@ int kvm_riscv_mmu_map(struct kvm_vcpu *vcpu, struct kvm_memory_slot *memslot, goto out_unlock; /* Check if we are backed by a THP and thus use block mapping if possible */ - if (vma_pagesize == PAGE_SIZE) + if (!logging && (vma_pagesize == PAGE_SIZE)) vma_pagesize = transparent_hugepage_adjust(kvm, memslot, hva, &hfn, &gpa); if (writable) { |
