summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTina Zhang <tina.zhang@intel.com>2023-10-27 02:05:22 +0200
committerJoerg Roedel <jroedel@suse.de>2023-12-12 10:11:29 +0100
commit2396046d75d3c0b2cfead852a77efd023f8539dc (patch)
treec4a2ebb4f3acffc8c4b21cc59bd7ef8f5213a712 /arch
parentiommu/vt-d: Remove mm->pasid in intel_sva_bind_mm() (diff)
downloadlinux-2396046d75d3c0b2cfead852a77efd023f8539dc.tar.xz
linux-2396046d75d3c0b2cfead852a77efd023f8539dc.zip
iommu: Add mm_get_enqcmd_pasid() helper function
mm_get_enqcmd_pasid() should be used by architecture code and closely related to learn the PASID value that the x86 ENQCMD operation should use for the mm. For the moment SMMUv3 uses this without any connection to ENQCMD, it will be cleaned up similar to how the prior patch made VT-d use the PASID argument of set_dev_pasid(). The motivation is to replace mm->pasid with an iommu private data structure that is introduced in a later patch. Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Tested-by: Nicolin Chen <nicolinc@nvidia.com> Signed-off-by: Tina Zhang <tina.zhang@intel.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20231027000525.1278806-4-tina.zhang@intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/traps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 2b62dbb3396a..5944d759afe7 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -591,7 +591,7 @@ static bool try_fixup_enqcmd_gp(void)
if (!mm_valid_pasid(current->mm))
return false;
- pasid = current->mm->pasid;
+ pasid = mm_get_enqcmd_pasid(current->mm);
/*
* Did this thread already have its PASID activated?