]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu/vt-d: add wrapper functions for page allocations
authorPasha Tatashin <pasha.tatashin@soleen.com>
Sat, 13 Apr 2024 00:25:12 +0000 (00:25 +0000)
committerJoerg Roedel <jroedel@suse.de>
Mon, 15 Apr 2024 12:31:40 +0000 (14:31 +0200)
commit06c375053cefc3a2f383d200596abe5ab3fb35f9
tree39803ef6a16135038b116b43b263d7272f55436d
parent0bbac3facb5d6cc0171c45c9873a2dc96bea9680
iommu/vt-d: add wrapper functions for page allocations

In order to improve observability and accountability of IOMMU layer, we
must account the number of pages that are allocated by functions that
are calling directly into buddy allocator.

This is achieved by first wrapping the allocation related functions into a
separate inline functions in new file:

drivers/iommu/iommu-pages.h

Convert all page allocation calls under iommu/intel to use these new
functions.

Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Acked-by: David Rientjes <rientjes@google.com>
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
Link: https://lore.kernel.org/r/20240413002522.1101315-2-pasha.tatashin@soleen.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/dmar.c
drivers/iommu/intel/iommu.c
drivers/iommu/intel/iommu.h
drivers/iommu/intel/irq_remapping.c
drivers/iommu/intel/pasid.c
drivers/iommu/intel/svm.c
drivers/iommu/iommu-pages.h [new file with mode: 0644]