]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Handle memory shortage on pasid table allocation
authorLu Baolu <baolu.lu@linux.intel.com>
Sat, 8 Sep 2018 01:42:53 +0000 (09:42 +0800)
committerJoerg Roedel <jroedel@suse.de>
Tue, 25 Sep 2018 12:33:02 +0000 (14:33 +0200)
commit6c7929409b9d1087a337e7bb2e7c5e470afb3c3c
tree6a3b6e84ed02d93dcd2681ca6932c42ebe8097ac
parent3022041662134161d0f1c6f37a07910b7584f6ff
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: 766308250ad1 ("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>
drivers/iommu/intel-iommu.c
drivers/iommu/intel-pasid.h