preserve DMA offsets when using swiotlb
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest posting 3/39 patches 7 repliesIn review
- v2 posting 2/39 patches 4 repliesSuperseded
- v2 posting 1/38 patches 2 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 8 patches | 10 replies | Superseded |
Changes in v2 from the cover letter
Rebased patches to 5.4.115
Updated patch description to correct format.
Patches in v2 posting 3/3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | driver core: add a min_align_mask field to struct device_dma_parametersinclude/ include/ | +17 | 0 replies | |
| 2/9 | swiotlb: add a IO_TLB_SIZE defineinclude/ kernel/ | +7 | 0 replies | |
| 3/9 | swiotlb: factor out an io_tlb_offset helperkernel/ | +13 | 0 replies | |
| 4/9 | swiotlb: factor out a nr_slots helperkernel/ | +9 | 0 replies | |
| 5/9 | swiotlb: clean up swiotlb_tbl_unmap_singlekernel/ | +21 | 0 replies | |
| 6/9 | swiotlb: refactor swiotlb_tbl_map_singlekernel/ | +92 | 0 replies | |
| 7/9 | swiotlb: don't modify orig_addr in swiotlb_tbl_sync_singlekernel/ | +0 | 0 replies | |
| 8/9 | swiotlb: respect min_align_maskkernel/ | +32 | 0 replies | |
| 9/9 | nvme-pci: set min_align_maskdrivers/ | +1 | 0 replies |
Reviews trailers per patch
8 of 9 patches have a Reviewed-by or Acked-by.
| Patch | Greg Kroah-Hartman | Jianxiong Gao |
|---|---|---|
| 1/9 | A-b | |
| 2/9 | A-b T-b | |
| 3/9 | A-b T-b | |
| 4/9 | A-b T-b | |
| 5/9 | A-b T-b | |
| 6/9 | A-b T-b | |
| 7/9 | A-b T-b | |
| 8/9 | A-b T-b | |
| 9/9 | T-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 5.4 v2 0/9] preserve DMA offsets when using swiotlb
We observed several NVMe failures when running with SWIOTLB. The root cause of the issue is that when data is mapped via SWIOTLB, the address offset is not preserved. Several device drivers including the NVMe driver relies on this offset to function correctly.
Even though we discovered the error when running using AMD SEV, we have reproduced the same error in Rhel 8 without SEV. By adding swiotlb=force option to the boot command line parameter, NVMe funcionality is impacted. For example formatting a disk into xfs format returns an error.
----
Changes in v2:
Rebased patches to 5.4.115
Updated patch description to correct format.
Jianxiong Gao (9):
driver core: add a min_align_mask field to struct
device_dma_parameters
swiotlb: add a IO_TLB_SIZE define
swiotlb: factor out an 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
swiotlb: respect min_align_mask
nvme-pci: set min_align_mask
drivers/nvme/host/pci.c | 1 + include/linux/device.h | 1 + include/linux/dma-mapping.h | 16 +++ include/linux/swiotlb.h | 1 + kernel/dma/swiotlb.c | 269 ++++++++++++++++++++---------------- 5 files changed, 169 insertions(+), 119 deletions(-)
Signature · 1 line
2.31.1.751.gd2f1c929bd-goog