IOMMU incompatibility with discard on certain devices

Philip Langdale philipl at
Sun Nov 10 07:11:02 PST 2019

Hi all,

I'm writing to highlight a problem that is affecting users of certain
nvme ssds as discussed here:

The problem has been narrowed down to some devices always doing page
aligned reads when reading the list of segments to discard, rather than
reading the exact size passed. When an enforcing IOMMU is used (both
Intel and AMD systems exhibit the same behaviour in the reports), these
page-aligned reads are rejected because they are larger than the actual

In the bugzilla bug, a patch was proposed to add a device quirk that
ensures the segment list allocation is page-aligned, and this solved
the problem for everyone who tried it. Another patch was offered that
simply always page-aligns the allocations and perhaps that's
actually better?

If I was the patch author, I would have sent the quirk patch to the
list, but as I am not, I can't sign-off on it. It would be great if
someone could look at this, and we can get a fix committed.



More information about the Linux-nvme mailing list