Project

General

Profile

Actions

Bug #8624

closed

xhci and nvme can't bind DMA memory with IOMMU enabled

Added by Hans Rosenfeld almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
kernel
Start date:
2017-09-07
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

Both xhci and nvme have problems when allocating DMA memory with IOMMU enabled.

This happens when the size of the DMA buffer is the same as the specified maximum DMA transfer size in the DMA attributes (dma_attr_maxxfer). After most of the work for DMA binding is done, roonex_coredma_bindhdl() will check whether the DMA size is less than the maximum size. If it isn't, it will either go through a "slow path" when IOMMU is disabled, or fail the request if IOMMU is enabled.

This seems to be wrong, the code should check for the DMA size to be less or equal than the maximum size. Other places in rootnex always check for the DMA size to not be larger than the maximum size, which also makes much more sense.

Actions

Also available in: Atom PDF