Commit b3f2575a authored by Bo Liu's avatar Bo Liu Committed by Anup Patel

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: default avatarBo Liu <liubo03@inspur.com>
Reviewed-by: default avatarAndrew Jones <ajones@ventanamicro.com>
Signed-off-by: default avatarAnup Patel <anup@brainfault.org>
parent e78a1117
...@@ -632,7 +632,7 @@ int kvm_riscv_gstage_map(struct kvm_vcpu *vcpu, ...@@ -632,7 +632,7 @@ int kvm_riscv_gstage_map(struct kvm_vcpu *vcpu,
mmap_read_lock(current->mm); mmap_read_lock(current->mm);
vma = find_vma_intersection(current->mm, hva, hva + 1); vma = vma_lookup(current->mm, hva);
if (unlikely(!vma)) { if (unlikely(!vma)) {
kvm_err("Failed to find VMA for hva 0x%lx\n", hva); kvm_err("Failed to find VMA for hva 0x%lx\n", hva);
mmap_read_unlock(current->mm); mmap_read_unlock(current->mm);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment