aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Liu <[email protected]>2022-09-21 10:40:54 +0800
committerJoerg Roedel <[email protected]>2022-09-21 10:22:54 +0200
commit154897807050c1161cb2660e502fc0470d46b986 (patch)
treeb1e0232ac7c2c65923d91044593833db862feac8
parent7ebb5f8e001037efbdf18afabbbebf71bd98825e (diff)
iommu/vt-d: Check correct capability for sagaw determination
Check 5-level paging capability for 57 bits address width instead of checking 1GB large page capability. Fixes: 53fc7ad6edf2 ("iommu/vt-d: Correctly calculate sagaw value of IOMMU") Cc: [email protected] Reported-by: Raghunathan Srinivasan <[email protected]> Signed-off-by: Yi Liu <[email protected]> Reviewed-by: Jerry Snitselaar <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Raghunathan Srinivasan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lu Baolu <[email protected]> Signed-off-by: Joerg Roedel <[email protected]>
-rw-r--r--drivers/iommu/intel/iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index 64d30895a4c8..31bc50e538a3 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -399,7 +399,7 @@ static unsigned long __iommu_calculate_sagaw(struct intel_iommu *iommu)
{
unsigned long fl_sagaw, sl_sagaw;
- fl_sagaw = BIT(2) | (cap_fl1gp_support(iommu->cap) ? BIT(3) : 0);
+ fl_sagaw = BIT(2) | (cap_5lp_support(iommu->cap) ? BIT(3) : 0);
sl_sagaw = cap_sagaw(iommu->cap);
/* Second level only. */