# HG changeset patch # User Albert Lee # Date 1287107056 -3600 # Node ID 8bfa85c99f869b032fe3d5d8eff5ff50e7a5cb78 # Parent 25c1876a8d9c024416d4b7446889cebbebb4f2ad 185 PV boot panics due to unresolved iommulib symbol Reviewed by: garrett@nexenta.com Approved by: garrett@nexenta.com diff -r 25c1876a8d9c -r 8bfa85c99f86 usr/src/uts/i86pc/io/rootnex.c --- a/usr/src/uts/i86pc/io/rootnex.c Thu Oct 14 23:15:08 2010 +0100 +++ b/usr/src/uts/i86pc/io/rootnex.c Fri Oct 15 02:44:16 2010 +0100 @@ -2208,14 +2208,19 @@ * Clean up and return an error. */ +#if defined(__amd64) && !defined(__xpv) + if (dma->dp_dvma_used) { (void) iommulib_nexdma_unmapobject(dip, rdip, handle, &dma->dp_dvma); e = DDI_DMA_NOMAPPING; } else { +#endif e = rootnex_bind_slowpath(hp, dmareq, dma, attr, &dma->dp_dma, kmflag); +#if defined(__amd64) && !defined(__xpv) } +#endif if ((e != DDI_DMA_MAPPED) && (e != DDI_DMA_PARTIAL_MAP)) { if (dma->dp_need_to_free_cookie) { kmem_free(dma->dp_cookies, dma->dp_cookie_size); @@ -2328,9 +2333,11 @@ rootnex_teardown_copybuf(dma); rootnex_teardown_windows(dma); +#if defined(__amd64) && !defined(__xpv) if (IOMMU_USED(rdip)) (void) iommulib_nexdma_unmapobject(dip, rdip, handle, &dma->dp_dvma); +#endif /* * If we had to allocate space to for the worse case sgl (it didn't