Skip to contentSkip to conversation

AMD/IOMMU: don't leave page table mapped when unmapping ...

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 leave page table mapped when unmapping ...

... an already not mapped page. With all other exit paths doing the unmap, I have no idea how I managed to miss that aspect at the time.

Fixes ad591454f069 ("AMD/IOMMU: don't needlessly trigger errors/crashes when unmapping a page")
xen/drivers/passthrough/amd/iommu_map.c +3 -0
@@ -243,7 +243,10 @@ static int iommu_pde_from_dfn(struct dom
         else if ( !pde->pr )
         {
             if ( !map )
+            {
+                unmap_domain_page(next_table_vaddr);
                 return 0;
+            }
 
             if ( next_table_mfn == 0 )
             {