[PATCH v3 1/2] iommu/amd: Remove PT_FEAT_DYNAMIC_TOP from PT_FORCE_ENABLED_FEATURES

From: Ankit Soni

Date: Mon Mar 09 2026 - 10:07:08 EST


Dynamic top is used to grow the page table levels. However, if the VA
size is small and the initial page table level already covers the entire
address space, table growth is not required. In that case, the generic
page table framework clears PT_FEAT_DYNAMIC_TOP, which in turn causes
error -EOPNOTSUPP and leads to domain initialization failure.

Remove PT_FEAT_DYNAMIC_TOP from PT_FORCE_ENABLED_FEATURES, since during
domain allocation AMD IOMMU driver explicitly sets PT_FEAT_DYNAMIC_TOP
via cfg.common.features, this keeps normal runtime behavior unchanged.

Signed-off-by: Ankit Soni <Ankit.Soni@xxxxxxx>
---
drivers/iommu/generic_pt/fmt/iommu_amdv1.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/generic_pt/fmt/iommu_amdv1.c b/drivers/iommu/generic_pt/fmt/iommu_amdv1.c
index 72a2337d0c55..61e025a85e6a 100644
--- a/drivers/iommu/generic_pt/fmt/iommu_amdv1.c
+++ b/drivers/iommu/generic_pt/fmt/iommu_amdv1.c
@@ -9,7 +9,7 @@
BIT(PT_FEAT_AMDV1_ENCRYPT_TABLES) | \
BIT(PT_FEAT_AMDV1_FORCE_COHERENCE))
#define PT_FORCE_ENABLED_FEATURES \
- (BIT(PT_FEAT_DYNAMIC_TOP) | BIT(PT_FEAT_AMDV1_ENCRYPT_TABLES) | \
+ (BIT(PT_FEAT_AMDV1_ENCRYPT_TABLES) | \
BIT(PT_FEAT_AMDV1_FORCE_COHERENCE))

#include "iommu_template.h"
--
2.43.0