summaryrefslogtreecommitdiff
path: root/drivers/virt
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2024-04-10 17:55:26 +0200
committerAndrew Morton <akpm@linux-foundation.org>2024-05-05 17:53:27 -0700
commit29ae7d96d166fa08c7232daf8a314ef5ba1efd20 (patch)
treece705a55e77e2e85442ff965a37e5a7c980ddf97 /drivers/virt
parent3d6586008f7b638f91f3332602592caa8b00b559 (diff)
downloadlwn-29ae7d96d166fa08c7232daf8a314ef5ba1efd20.tar.gz
lwn-29ae7d96d166fa08c7232daf8a314ef5ba1efd20.zip
mm: pass VMA instead of MM to follow_pte()
... and centralize the VM_IO/VM_PFNMAP sanity check in there. We'll now also perform these sanity checks for direct follow_pte() invocations. For generic_access_phys(), we might now check multiple times: nothing to worry about, really. Link: https://lkml.kernel.org/r/20240410155527.474777-3-david@redhat.com Signed-off-by: David Hildenbrand <david@redhat.com> Acked-by: Sean Christopherson <seanjc@google.com> [KVM] Cc: Alex Williamson <alex.williamson@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Fei Li <fei1.li@intel.com> Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Cc: Heiko Carstens <hca@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Yonghua Huang <yonghua.huang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/virt')
-rw-r--r--drivers/virt/acrn/mm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/virt/acrn/mm.c b/drivers/virt/acrn/mm.c
index 2d98e1e185c4..db8ff1d0ac23 100644
--- a/drivers/virt/acrn/mm.c
+++ b/drivers/virt/acrn/mm.c
@@ -187,8 +187,7 @@ int acrn_vm_ram_map(struct acrn_vm *vm, struct acrn_vm_memmap *memmap)
}
for (i = 0; i < nr_pages; i++) {
- ret = follow_pte(vma->vm_mm,
- memmap->vma_base + i * PAGE_SIZE,
+ ret = follow_pte(vma, memmap->vma_base + i * PAGE_SIZE,
&ptep, &ptl);
if (ret)
break;