Jan Beulich
2009-Jan-30 10:51 UTC
[Xen-devel] [PATCH 2/2] amd-iommu: drop locks before printing error messages
Signed-off-by: Jan Beulich <jbeulich@novell.com> --- 2009-01-27.orig/xen/drivers/passthrough/amd/iommu_map.c 2009-01-30 08:43:35.000000000 +0100 +++ 2009-01-27/xen/drivers/passthrough/amd/iommu_map.c 2009-01-30 08:46:29.000000000 +0100 @@ -461,8 +461,8 @@ int amd_iommu_map_page(struct domain *d, iommu_l2e = iommu_l2e_from_pfn(hd->root_table, hd->paging_mode, gfn); if ( iommu_l2e == 0 ) { - amd_iov_error("Invalid IO pagetable entry gfn = %lx\n", gfn); spin_unlock_irqrestore(&hd->mapping_lock, flags); + amd_iov_error("Invalid IO pagetable entry gfn = %lx\n", gfn); return -EFAULT; } set_iommu_l1e_present(iommu_l2e, gfn, (u64)mfn << PAGE_SHIFT, iw, ir); @@ -493,8 +493,8 @@ int amd_iommu_unmap_page(struct domain * if ( iommu_l2e == 0 ) { - amd_iov_error("Invalid IO pagetable entry gfn = %lx\n", gfn); spin_unlock_irqrestore(&hd->mapping_lock, flags); + amd_iov_error("Invalid IO pagetable entry gfn = %lx\n", gfn); return -EFAULT; } @@ -533,9 +533,9 @@ int amd_iommu_reserve_domain_unity_map( if ( iommu_l2e == 0 ) { - amd_iov_error( - "Invalid IO pagetable entry phys_addr = %lx\n", phys_addr); spin_unlock_irqrestore(&hd->mapping_lock, flags); + amd_iov_error("Invalid IO pagetable entry phys_addr = %lx\n", + phys_addr); return -EFAULT; } @@ -582,8 +582,8 @@ int amd_iommu_sync_p2m(struct domain *d) if ( iommu_l2e == 0 ) { spin_unlock(&d->page_alloc_lock); - amd_iov_error("Invalid IO pagetable entry gfn = %lx\n", gfn); spin_unlock_irqrestore(&hd->mapping_lock, flags); + amd_iov_error("Invalid IO pagetable entry gfn = %lx\n", gfn); return -EFAULT; } _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Apparently Analagous Threads
- [RFC PATCH 2/3] AMD IOMMU: Implement p2m sharing
- [PATCH, RFC] x86/iommu: don''t map RAM holes above 4G
- [PATCH] fix memory allocation from NUMA node for VT-d.
- [amd iommu] [patch 2/2]Add APCI tables support for AMD IOMMU
- [PATCH] x86-64: emulation support for cmpxchg16b