diff options
author | Sohil Mehta <sohil.mehta@intel.com> | 2017-12-20 22:59:26 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2018-01-17 17:02:50 +0300 |
commit | f1ac10c24efbbcba0f8dae37ee90d45847f5c5af (patch) | |
tree | dfc517909ee0e7bd723dd37dace984008ba51dab /drivers/iommu | |
parent | 59103caa6839592788e7ad58b35863aac034631a (diff) | |
download | linux-f1ac10c24efbbcba0f8dae37ee90d45847f5c5af.tar.xz |
iommu/vt-d: Add a check for 5-level paging support
Add a check to verify IOMMU 5-level paging support. If the CPU supports
supports 5-level paging but the IOMMU does not support it then disable
SVM by not allocating PASID tables.
Signed-off-by: Sohil Mehta <sohil.mehta@intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/intel-svm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/intel-svm.c b/drivers/iommu/intel-svm.c index e9a56ad09a76..b43dc1edcef0 100644 --- a/drivers/iommu/intel-svm.c +++ b/drivers/iommu/intel-svm.c @@ -45,6 +45,10 @@ int intel_svm_alloc_pasid_tables(struct intel_iommu *iommu) !cap_fl1gp_support(iommu->cap)) return -EINVAL; + if (cpu_feature_enabled(X86_FEATURE_LA57) && + !cap_5lp_support(iommu->cap)) + return -EINVAL; + /* Start at 2 because it's defined as 2^(1+PSS) */ iommu->pasid_max = 2 << ecap_pss(iommu->ecap); |