mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
iommu/vt-d: Add a check for 1GB page support
Add a check to verify IOMMU 1GB page support. If the CPU supports 1GB pages but the IOMMU does not support it then disable SVM by not allocating PASID tables. Signed-off-by: Sohil Mehta <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
This commit is contained in:
parent
5e3b4a15dd
commit
59103caa68
2 changed files with 5 additions and 0 deletions
|
|
@ -41,6 +41,10 @@ int intel_svm_alloc_pasid_tables(struct intel_iommu *iommu)
|
|||
struct page *pages;
|
||||
int order;
|
||||
|
||||
if (cpu_feature_enabled(X86_FEATURE_GBPAGES) &&
|
||||
!cap_fl1gp_support(iommu->cap))
|
||||
return -EINVAL;
|
||||
|
||||
/* Start at 2 because it's defined as 2^(1+PSS) */
|
||||
iommu->pasid_max = 2 << ecap_pss(iommu->ecap);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue