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 over 3 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 over 3 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 2cedd8f0ecbd2b29bf0aac72bb8b7413b0326938 Author: Hans Rosenfeld <firstname.lastname@example.org> 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 <email@example.com> Reviewed by: Jerry Jelinek <firstname.lastname@example.org> Approved by: Garrett D'Amore <email@example.com>