All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5.4 v2 0/9] preserve DMA offsets when using swiotlb
@ 2021-05-18 22:18 Jianxiong Gao
  2021-05-18 22:18 ` [PATCH 5.4 v2 1/9] driver core: add a min_align_mask field to struct device_dma_parameters Jianxiong Gao
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Jianxiong Gao @ 2021-05-18 22:18 UTC (permalink / raw)
  To: stable, hch, marcorr, sashal; +Cc: Jianxiong Gao

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(-)

-- 
2.31.1.751.gd2f1c929bd-goog


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-05-20  8:33 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 22:18 [PATCH 5.4 v2 0/9] preserve DMA offsets when using swiotlb Jianxiong Gao
2021-05-18 22:18 ` [PATCH 5.4 v2 1/9] driver core: add a min_align_mask field to struct device_dma_parameters Jianxiong Gao
2021-05-18 22:18 ` [PATCH 5.4 v2 2/9] swiotlb: add a IO_TLB_SIZE define Jianxiong Gao
2021-05-18 22:18 ` [PATCH 5.4 v2 3/9] swiotlb: factor out an io_tlb_offset helper Jianxiong Gao
2021-05-18 22:18 ` [PATCH 5.4 v2 4/9] swiotlb: factor out a nr_slots helper Jianxiong Gao
2021-05-18 22:18 ` [PATCH 5.4 v2 5/9] swiotlb: clean up swiotlb_tbl_unmap_single Jianxiong Gao
2021-05-18 22:18 ` [PATCH 5.4 v2 6/9] swiotlb: refactor swiotlb_tbl_map_single Jianxiong Gao
2021-05-18 22:18 ` [PATCH 5.4 v2 7/9] swiotlb: don't modify orig_addr in swiotlb_tbl_sync_single Jianxiong Gao
2021-05-18 22:18 ` [PATCH 5.4 v2 8/9] swiotlb: respect min_align_mask Jianxiong Gao
2021-05-18 22:18 ` [PATCH 5.4 v2 9/9] nvme-pci: set min_align_mask Jianxiong Gao
2021-05-19  8:11 ` [PATCH 5.4 v2 0/9] preserve DMA offsets when using swiotlb Greg KH
2021-05-19 16:42   ` Jianxiong Gao
2021-05-19 17:03     ` Greg KH
2021-05-19 17:18       ` Marc Orr
2021-05-19 17:25         ` Greg KH
2021-05-19 20:01           ` Marc Orr
2021-05-20  8:32             ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.