Skip to contentSkip to conversation

IOMMU incompatibility with discard on certain devices

DISCUSSION Philip Langdale 1 participant 1 message Nov 10, 2019 NVMe

lore
Share & tools
lore
#0 lore raw

Hi all,

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

https://bugzilla.kernel.org/show_bug.cgi?id=202665

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 allocations.

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.

Thanks,

--phil

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme