From: Ankit Soni Date: Mon, 13 Apr 2026 14:45:19 +0000 (+0000) Subject: iommu_pt: support small VA for AMDv1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5240dab55b51c5f14448643ad044a5643f5b569b;p=thirdparty%2Fkernel%2Flinux.git iommu_pt: support small VA for AMDv1 When hardware/VM request a small VA limit, the generic page-table code clears PT_FEAT_DYNAMIC_TOP. This later causes domain initialization to fail with -EOPNOTSUPP. Remove the clearing so init succeeds when the VA fits in the starting level and no top-level growth is needed. Signed-off-by: Ankit Soni Reviewed-by: Vasant Hegde Reviewed-by: Jason Gunthorpe Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/generic_pt/iommu_pt.h b/drivers/iommu/generic_pt/iommu_pt.h index 1765986e24e82..512c03f72d921 100644 --- a/drivers/iommu/generic_pt/iommu_pt.h +++ b/drivers/iommu/generic_pt/iommu_pt.h @@ -1149,10 +1149,6 @@ static int pt_init_common(struct pt_common *common) if (PT_WARN_ON(top_range.top_level > PT_MAX_TOP_LEVEL)) return -EINVAL; - if (top_range.top_level == PT_MAX_TOP_LEVEL || - common->max_vasz_lg2 == top_range.max_vasz_lg2) - common->features &= ~BIT(PT_FEAT_DYNAMIC_TOP); - if (top_range.max_vasz_lg2 == PT_VADDR_MAX_LG2) common->features |= BIT(PT_FEAT_FULL_VA);