projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b7270c
)
RISC-V: KVM: Use find_vma_intersection() to search for intersecting VMAs
author
Quan Zhou
<zhouquan@iscas.ac.cn>
Tue, 17 Jun 2025 13:04:23 +0000
(21:04 +0800)
committer
Anup Patel
<anup@brainfault.org>
Mon, 28 Jul 2025 16:58:28 +0000
(22:28 +0530)
There is already a helper function find_vma_intersection() in KVM
for searching intersecting VMAs, use it directly.
Signed-off-by: Quan Zhou <zhouquan@iscas.ac.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link:
https://lore.kernel.org/r/230d6c8c8b8dd83081fcfd8d83a4d17c8245fa2f.1731552790.git.zhouquan@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/mmu.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/riscv/kvm/mmu.c
b/arch/riscv/kvm/mmu.c
index 9f7dcd8cd7415c14378246c1f1987834b5a79101..5465567df5a75aa22ec5bc06b12338a2f5e8e077 100644
(file)
--- a/
arch/riscv/kvm/mmu.c
+++ b/
arch/riscv/kvm/mmu.c
@@
-205,10
+205,11
@@
int kvm_arch_prepare_memory_region(struct kvm *kvm,
* +--------------------------------------------+
*/
do {
- struct vm_area_struct *vma
= find_vma(current->mm, hva)
;
+ struct vm_area_struct *vma;
hva_t vm_start, vm_end;
- if (!vma || vma->vm_start >= reg_end)
+ vma = find_vma_intersection(current->mm, hva, reg_end);
+ if (!vma)
break;
/*