Skip to contentSkip to conversation

AMD/IOMMU: don't increase perms when splitting superpage

PATCH In review Jan Beulich 2 participants 2 messages Aug 19, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AMD/IOMMU: don't increase perms when splitting superpage

The old (super)page's permissions ought to be propagated, rather than blindly allowing both reads and writes.

xen/drivers/passthrough/amd/iommu_map.c +1 -1
@@ -231,7 +231,7 @@ static int iommu_pde_from_dfn(struct dom
             next_table_mfn = mfn_x(page_to_mfn(table));
 
             set_iommu_ptes_present(next_table_mfn, pfn, mfn, PTE_PER_TABLE_SIZE,
-                                   next_level, true, true);
+                                   next_level, pde->iw, pde->ir);
             smp_wmb();
             set_iommu_pde_present(pde, next_table_mfn, next_level, true,
                                   true);