From: Wei Wang Date: Tue, 11 Sep 2012 12:01:52 +0000 (+0200) Subject: amd iommu: use next_level instead of recalculating it X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~7956 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ee3c6202a85a08c80d9f6768e5105e449aee17f0;p=xen.git amd iommu: use next_level instead of recalculating it Signed-off-by: Wei Wang Committed-by: Jan Beulich --- diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/amd/pci_amd_iommu.c index ad24018033..00c0dab663 100644 --- a/xen/drivers/passthrough/amd/pci_amd_iommu.c +++ b/xen/drivers/passthrough/amd/pci_amd_iommu.c @@ -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); } } }