[PATCH RESEND v9 01/13] mm: Define pasid in mm

Jean-Philippe Brucker jean-philippe at linaro.org
Mon Aug 17 13:15:47 EDT 2020


From: Fenghua Yu <fenghua.yu at intel.com>

PASID is shared by all threads in a process. So the logical place to keep
track of it is in the "mm". Both ARM and X86 need to use the PASID in the
"mm".

Suggested-by: Christoph Hellwig <hch at infradead.org>
Signed-off-by: Fenghua Yu <fenghua.yu at intel.com>
Reviewed-by: Tony Luck <tony.luck at intel.com>
---
https://lore.kernel.org/linux-iommu/1594684087-61184-8-git-send-email-fenghua.yu@intel.com/
---
---
 include/linux/mm_types.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 496c3ff97cce..1ff0615ef19f 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -542,6 +542,10 @@ struct mm_struct {
 		atomic_long_t hugetlb_usage;
 #endif
 		struct work_struct async_put_work;
+
+#ifdef CONFIG_IOMMU_SUPPORT
+		u32 pasid;
+#endif
 	} __randomize_layout;
 
 	/*
-- 
2.28.0




More information about the linux-arm-kernel mailing list