From: "Jan Beulich" Subject: [PATCH 2/2] amd-iommu: drop locks before printing error messages Date: Fri, 30 Jan 2009 10:51:37 +0000 Message-ID: <4982E9C9.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Signed-off-by: Jan Beulich --- 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 =3D iommu_l2e_from_pfn(hd->root_table, hd->paging_mode, = gfn); if ( iommu_l2e =3D=3D 0 ) { - amd_iov_error("Invalid IO pagetable entry gfn =3D %lx\n", gfn); spin_unlock_irqrestore(&hd->mapping_lock, flags); + amd_iov_error("Invalid IO pagetable entry gfn =3D %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 * =20 if ( iommu_l2e =3D=3D 0 ) { - amd_iov_error("Invalid IO pagetable entry gfn =3D %lx\n", gfn); spin_unlock_irqrestore(&hd->mapping_lock, flags); + amd_iov_error("Invalid IO pagetable entry gfn =3D %lx\n", gfn); return -EFAULT; } =20 @@ -533,9 +533,9 @@ int amd_iommu_reserve_domain_unity_map( =20 if ( iommu_l2e =3D=3D 0 ) { - amd_iov_error( - "Invalid IO pagetable entry phys_addr =3D %lx\n", phys_addr); spin_unlock_irqrestore(&hd->mapping_lock, flags); + amd_iov_error("Invalid IO pagetable entry phys_addr =3D = %lx\n", + phys_addr); return -EFAULT; } =20 @@ -582,8 +582,8 @@ int amd_iommu_sync_p2m(struct domain *d) if ( iommu_l2e =3D=3D 0 ) { spin_unlock(&d->page_alloc_lock); - amd_iov_error("Invalid IO pagetable entry gfn =3D %lx\n", = gfn); spin_unlock_irqrestore(&hd->mapping_lock, flags); + amd_iov_error("Invalid IO pagetable entry gfn =3D %lx\n", = gfn); return -EFAULT; } =20