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

Jan Beulich posted 1 patch 2 years, 8 months ago
Failed in applying to current master (apply log)
[PATCH] AMD/IOMMU: don't increase perms when splitting superpage
Posted by Jan Beulich 2 years, 8 months ago
The old (super)page's permissions ought to be propagated, rather than
blindly allowing both reads and writes.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/amd/iommu_map.c
+++ b/xen/drivers/passthrough/amd/iommu_map.c
@@ -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);


Re: [PATCH] AMD/IOMMU: don't increase perms when splitting superpage
Posted by Paul Durrant 2 years, 8 months ago
On 19/08/2021 09:04, Jan Beulich wrote:
> The old (super)page's permissions ought to be propagated, rather than
> blindly allowing both reads and writes.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Paul Durrant <paul@xen.org>