Skip to content

Commit b3f2575

Browse files
Bo Liuavpatel
authored andcommitted
RISC-V: KVM: use vma_lookup() instead of find_vma_intersection()
vma_lookup() finds the vma of a specific address with a cleaner interface and is more readable. Signed-off-by: Bo Liu <[email protected]> Reviewed-by: Andrew Jones <[email protected]> Signed-off-by: Anup Patel <[email protected]>
1 parent e78a111 commit b3f2575

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/kvm/mmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ int kvm_riscv_gstage_map(struct kvm_vcpu *vcpu,
632632

633633
mmap_read_lock(current->mm);
634634

635-
vma = find_vma_intersection(current->mm, hva, hva + 1);
635+
vma = vma_lookup(current->mm, hva);
636636
if (unlikely(!vma)) {
637637
kvm_err("Failed to find VMA for hva 0x%lx\n", hva);
638638
mmap_read_unlock(current->mm);

0 commit comments

Comments
 (0)