]> xenbits.xensource.com Git - xen.git/commitdiff
amd iommu: use next_level instead of recalculating it
authorWei Wang <wei.wang2@amd.com>
Tue, 11 Sep 2012 12:01:52 +0000 (14:01 +0200)
committerWei Wang <wei.wang2@amd.com>
Tue, 11 Sep 2012 12:01:52 +0000 (14:01 +0200)
Signed-off-by: Wei Wang <wei.wang2@amd.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
xen/drivers/passthrough/amd/pci_amd_iommu.c

index ad2401803361acb95c25049570fd74d68761c889..00c0dab663fba2e2d71c64eea436699a6808ad51 100644 (file)
@@ -409,8 +409,10 @@ static void deallocate_next_page_table(struct page_info* pg, int level)
             if ( (next_table_maddr != 0) && (next_level != 0)
                 && iommu_is_pte_present((u32*)pde) )
             {
+                /* We do not support skip level yet */
+                ASSERT(next_level == level - 1);
                 deallocate_next_page_table(
-                    maddr_to_page(next_table_maddr), level - 1);
+                    maddr_to_page(next_table_maddr), next_level);
             }
         }
     }