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>
Showing
- arch/s390/pci/pci_mmio.c 2 additions, 2 deletionsarch/s390/pci/pci_mmio.c
- arch/x86/mm/pat/memtype.c 1 addition, 4 deletionsarch/x86/mm/pat/memtype.c
- drivers/vfio/vfio_iommu_type1.c 2 additions, 2 deletionsdrivers/vfio/vfio_iommu_type1.c
- drivers/virt/acrn/mm.c 1 addition, 2 deletionsdrivers/virt/acrn/mm.c
- include/linux/mm.h 1 addition, 1 deletioninclude/linux/mm.h
- mm/memory.c 8 additions, 7 deletionsmm/memory.c
- virt/kvm/kvm_main.c 2 additions, 2 deletionsvirt/kvm/kvm_main.c
Please register or sign in to comment