[PATCH] [PATCH] Adding offset keeping option when mapping data via SWIOTLB.
Christoph Hellwig
hch at lst.de
Tue Nov 24 06:49:06 EST 2020
On Mon, Nov 23, 2020 at 02:18:07PM -0800, Jianxiong Gao wrote:
> NVMe driver and other applications may depend on the data offset
> to operate correctly. Currently when unaligned data is mapped via
> SWIOTLB, the data is mapped as slab aligned with the SWIOTLB. When
> booting with --swiotlb=force option and using NVMe as interface,
> running mkfs.xfs on Rhel fails because of the unalignment issue.
> This patch adds an option to make sure the mapped data preserves
> its offset of the orginal addrss. Tested on latest kernel that
> this patch fixes the issue.
>
> Signed-off-by: Jianxiong Gao <jxgao at google.com>
> Acked-by: David Rientjes <rientjes at google.com>
I think we actually need to do this by default. There are plenty
of other hardware designs that rely on dma mapping not adding
offsets that did not exist, e.g. ahci and various RDMA NICs.
More information about the Linux-nvme
mailing list