-
- Downloads
mmu_notifiers: rename invalidate_range notifier
There are two main use cases for mmu notifiers. One is by KVM which uses mmu_notifier_invalidate_range_start()/end() to manage a software TLB. The other is to manage hardware TLBs which need to use the invalidate_range() callback because HW can establish new TLB entries at any time. Hence using start/end() can lead to memory corruption as these callbacks happen too soon/late during page unmap. mmu notifier users should therefore either use the start()/end() callbacks or the invalidate_range() callbacks. To make this usage clearer rename the invalidate_range() callback to arch_invalidate_secondary_tlbs() and update documention. Link: https://lkml.kernel.org/r/6f77248cd25545c8020a54b4e567e8b72be4dca1.1690292440.git-series.apopple@nvidia.com Signed-off-by:Alistair Popple <apopple@nvidia.com> Suggested-by:
Jason Gunthorpe <jgg@nvidia.com> Acked-by:
Catalin Marinas <catalin.marinas@arm.com> Reviewed-by:
Jason Gunthorpe <jgg@nvidia.com> Cc: Andrew Donnellan <ajd@linux.ibm.com> Cc: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Cc: Frederic Barrat <fbarrat@linux.ibm.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: John Hubbard <jhubbard@nvidia.com> Cc: Kevin Tian <kevin.tian@intel.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Nicolin Chen <nicolinc@nvidia.com> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Sean Christopherson <seanjc@google.com> Cc: SeongJae Park <sj@kernel.org> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Will Deacon <will@kernel.org> Cc: Zhi Wang <zhi.wang.linux@gmail.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org>
Showing
- arch/arm64/include/asm/tlbflush.h 3 additions, 3 deletionsarch/arm64/include/asm/tlbflush.h
- arch/powerpc/mm/book3s64/radix_hugetlbpage.c 1 addition, 1 deletionarch/powerpc/mm/book3s64/radix_hugetlbpage.c
- arch/powerpc/mm/book3s64/radix_tlb.c 4 additions, 4 deletionsarch/powerpc/mm/book3s64/radix_tlb.c
- arch/x86/include/asm/tlbflush.h 1 addition, 1 deletionarch/x86/include/asm/tlbflush.h
- arch/x86/mm/tlb.c 1 addition, 1 deletionarch/x86/mm/tlb.c
- drivers/iommu/amd/iommu_v2.c 5 additions, 5 deletionsdrivers/iommu/amd/iommu_v2.c
- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c 7 additions, 6 deletionsdrivers/iommu/arm/arm-smmu-v3/arm-smmu-v3-sva.c
- drivers/iommu/intel/svm.c 4 additions, 4 deletionsdrivers/iommu/intel/svm.c
- drivers/misc/ocxl/link.c 4 additions, 4 deletionsdrivers/misc/ocxl/link.c
- include/linux/mmu_notifier.h 24 additions, 24 deletionsinclude/linux/mmu_notifier.h
- mm/huge_memory.c 2 additions, 2 deletionsmm/huge_memory.c
- mm/hugetlb.c 4 additions, 3 deletionsmm/hugetlb.c
- mm/mmu_notifier.c 16 additions, 5 deletionsmm/mmu_notifier.c
Loading
Please register or sign in to comment