From: Fenghua Yu <fenghua.yu@intel.com>
Date: Tue, 15 Sep 2020 09:30:11 -0700
Subject: mm: Add a pasid member to struct mm_struct
Git-commit: 52ad9bc64c74167466e70e0df4b99ee5ccef0078
Patch-mainline: v5.10-rc1
References: jsc#13318
A PASID is shared by all threads in a process. So the logical place to
keep track of it is in the mm_struct. Both ARM and x86 would use this
PASID.
[ bp: Massage commit message. ]
Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/1600187413-163670-8-git-send-email-fenghua.yu@intel.com
---
include/linux/mm_types.h | 4 ++++
1 file changed, 4 insertions(+)
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -524,6 +524,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;
/*