Actions
Bug #185
closedPV boot panics due to unresolved iommulib symbol
Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
kernel
Start date:
2010-09-11
Due date:
% Done:
100%
Estimated time:
Difficulty:
Tags:
Gerrit CR:
Description
When running stock onnv-tip (from the closed gate), the kernel panics when booting in paravirtualised mode (i86xpv), due to:
SunOS Release 5.11 - Copyright 1983-2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. /platform/i86xpv/kernel/drv/amd64/rootnex: undefined symbol 'iommulib_nexdma_unmapobject' WARNING: mod_load: cannot load module 'rootnex' panic[cpu0]/thread=fffffffffbc609e0: BAD TRAP: type=e (#pf Page fault) rp=fffffffffbcb4ec0 addr=20 occurred in module "genunix" due to a NULL pointer dereference
There was a large IOMMU putback (13050:515b1e9bea30) which introduces the issue. Below is (probably rather rough) patch to potentially address the issue (just about to test this):
diff -r b23a4dab3d50 usr/src/uts/i86pc/io/rootnex.c --- a/usr/src/uts/i86pc/io/rootnex.c Wed Aug 18 15:52:48 2010 -0600 +++ b/usr/src/uts/i86pc/io/rootnex.c Sat Sep 11 17:46:36 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
There may be other iommu related bugs as it doesn't look like the iommu putback was tested extensively (speculation).
Actions