IMMU_CONTIG_PADDR is broken for cookies with more than one page
The macro IMMU_CONTIG_PADDR() is used to check whether a physical address would be contiguously following the physical memory block described by a cookie. Yet the macro doesn't look at the number of pages in a cookie, so whenever a cookie already has 2 pages it will return false even if the physical address is contiguous.
This leads to the use of a unnecessarily high number of cookies, and in the worst case may trigger #8622.
Updated by Hans Rosenfeld about 2 years ago
The fix was tested on a system with IOMMU enabled. As expected the number of used cookies went down drastically as contiguous physical addresses were now correctly detected as such.
This change has been in illumos-joyent since around June.
Updated by Electric Monk about 2 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 2cedd8f0ecbd2b29bf0aac72bb8b7413b0326938 Author: Hans Rosenfeld <email@example.com> Date: 2017-09-20T18:35:31.000Z 8622 panic in PTE_set_all() 8623 IMMU_CONTIG_PADDR is broken for cookies with more than one page 8625 nvme causes bad free panic in IOMMU Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Reviewed by: Jerry Jelinek <email@example.com> Approved by: Garrett D'Amore <firstname.lastname@example.org>