Skip to content

preserve DMA offsets when using swiotlb

Jianxiong Gao stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8driver core: add a min_align_mask field to struct device_dma_parametersinclude/linux/device.h include/linux/dma-mapping.h+17 -00 replies
2/8swiotlb: factor out an io_tlb_offset helperkernel/dma/swiotlb.c+13 -70 replies
3/8swiotlb: factor out a nr_slots helperinclude/linux/swiotlb.h kernel/dma/swiotlb.c+10 -40 replies
4/8swiotlb: clean up swiotlb_tbl_unmap_singlekernel/dma/swiotlb.c+21 -210 replies
5/8swiotlb: refactor swiotlb_tbl_map_singleinclude/linux/swiotlb.h kernel/dma/swiotlb.c+90 -950 replies
6/8swiotlb: don't modify orig_addr in swiotlb_tbl_sync_singlekernel/dma/swiotlb.c+0 -10 replies
7/8swiotlb: respect min_align_maskkernel/dma/swiotlb.c+32 -110 replies
8/8nvme-pci: set min_align_maskdrivers/nvme/host/pci.c+1 -00 replies

Reviews trailers per patch

3 of 8 patches have a Reviewed-by or Acked-by.

PatchJianxiong Gao
1/8
2/8
3/8A-b T-b
4/8
5/8A-b T-b
6/8
7/8A-b T-b
8/8T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 5.4 0/8] preserve DMA offsets when using swiotlb

Hi all,

This series of backports fixes the SWIOTLB library to maintain the page offset when mapping a DMA address. The bug that motivated this patch series manifested when running a 5.4 kernel as a SEV guest with an NVMe device. However, any device that infers information from the page offset and is accessed through the SWIOTLB will benefit from this bug fix.

Jianxiong Gao (7):
driver core: add a min_align_mask field to struct
device_dma_parameters
swiotlb: add a io_tlb_offset helper
swiotlb: factor out a nr_slots helper
swiotlb: clean up swiotlb_tbl_unmap_single
swiotlb: refactor swiotlb_tbl_map_single
swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single
nvme-pci: set min_align_mask

Linus Torvalds (1):
Linux 5.4

 Makefile                    |   2 +-
 drivers/nvme/host/pci.c     |   1 +
 include/linux/device.h      |   1 +
 include/linux/dma-mapping.h |  16 +++
 include/linux/swiotlb.h     |   3 +-
 kernel/dma/swiotlb.c        | 262 ++++++++++++++++++++----------------
 6 files changed, 165 insertions(+), 120 deletions(-)
Signature · 1 line
2.27.0