summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorBo Liu <liubo03@inspur.com>2022-12-07 04:46:11 +0100
committerAnup Patel <anup@brainfault.org>2022-12-07 04:46:11 +0100
commitb3f2575a993497dde19c18db73208325e8efba60 (patch)
tree207f0a394def092ca2e17a59198e132901b25cb1 /arch
parentRISC-V: KVM: Add exit logic to main.c (diff)
downloadlinux-b3f2575a993497dde19c18db73208325e8efba60.tar.xz
linux-b3f2575a993497dde19c18db73208325e8efba60.zip
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 <liubo03@inspur.com> Reviewed-by: Andrew Jones <ajones@ventanamicro.com> Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/riscv/kvm/mmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kvm/mmu.c b/arch/riscv/kvm/mmu.c
index 3620ecac2fa1..5942d10c9736 100644
--- a/arch/riscv/kvm/mmu.c
+++ b/arch/riscv/kvm/mmu.c
@@ -632,7 +632,7 @@ int kvm_riscv_gstage_map(struct kvm_vcpu *vcpu,
mmap_read_lock(current->mm);
- vma = find_vma_intersection(current->mm, hva, hva + 1);
+ vma = vma_lookup(current->mm, hva);
if (unlikely(!vma)) {
kvm_err("Failed to find VMA for hva 0x%lx\n", hva);
mmap_read_unlock(current->mm);