From 66b282bbb1aa64a3d7a6f7d705cf10ba844cd611 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 12 Feb 2020 10:54:08 +0100 Subject: [PATCH] AMD/IOMMU: drop redundant code The level 1 special exit path is unnecessary in iommu_pde_from_dfn() - the subsequent code takes care of this case quite fine. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/drivers/passthrough/amd/iommu_map.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/amd/iommu_map.c index 2f3b47b366..3b7cf649ca 100644 --- a/xen/drivers/passthrough/amd/iommu_map.c +++ b/xen/drivers/passthrough/amd/iommu_map.c @@ -194,12 +194,6 @@ static int iommu_pde_from_dfn(struct domain *d, unsigned long dfn, next_table_mfn = mfn_x(page_to_mfn(table)); - if ( level == 1 ) - { - pt_mfn[level] = next_table_mfn; - return 0; - } - while ( level > 1 ) { unsigned int next_level = level - 1; -- 2.39.5