iommu/amd: Correctly encode huge pages in iommu page tables

When a default page-size for given level should be mapped,
the level encoding must be 0 rather than 7. This fixes an
issue seen on IOMMUv2 hardware, where this encoding is

Tested-by: Suravee Suthikulpanit <>
Signed-off-by: Joerg Roedel <>
1 file changed