aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/intel-pasid.h
diff options
context:
space:
mode:
authorLu Baolu <baolu.lu@linux.intel.com>2018-09-08 09:42:53 +0800
committerJoerg Roedel <jroedel@suse.de>2018-09-25 14:33:02 +0200
commitbe9e6598aeb0db70a7927d6b3bb4d3d6fb1c3e18 (patch)
tree6a3b6e84ed02d93dcd2681ca6932c42ebe8097ac /drivers/iommu/intel-pasid.h
parentiommu/rockchip: Free irqs in shutdown handler (diff)
downloadlinux-dev-be9e6598aeb0db70a7927d6b3bb4d3d6fb1c3e18.tar.xz
linux-dev-be9e6598aeb0db70a7927d6b3bb4d3d6fb1c3e18.zip
iommu/vt-d: Handle memory shortage on pasid table allocation
Pasid table memory allocation could return failure due to memory shortage. Limit the pasid table size to 1MiB because current 8MiB contiguous physical memory allocation can be hard to come by. W/o a PASID table, the device could continue to work with only shared virtual memory impacted. So, let's go ahead with context mapping even the memory allocation for pasid table failed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107783 Fixes: cc580e41260d ("iommu/vt-d: Per PCI device pasid table interfaces") Cc: Ashok Raj <ashok.raj@intel.com> Cc: Jacob Pan <jacob.jun.pan@linux.intel.com> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Reported-and-tested-by: Pelton Kyle D <kyle.d.pelton@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel-pasid.h')
-rw-r--r--drivers/iommu/intel-pasid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/intel-pasid.h b/drivers/iommu/intel-pasid.h
index 1c05ed6fc5a5..1fb5e12b029a 100644
--- a/drivers/iommu/intel-pasid.h
+++ b/drivers/iommu/intel-pasid.h
@@ -11,7 +11,7 @@
#define __INTEL_PASID_H
#define PASID_MIN 0x1
-#define PASID_MAX 0x100000
+#define PASID_MAX 0x20000
struct pasid_entry {
u64 val;