All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5 v3] Fix virtio-blk issue with SWIOTLB
@ 2019-01-23 16:30 Joerg Roedel
  2019-01-23 16:30 ` [PATCH 1/5] swiotlb: Introduce swiotlb_max_mapping_size() Joerg Roedel
                   ` (13 more replies)
  0 siblings, 14 replies; 60+ messages in thread
From: Joerg Roedel @ 2019-01-23 16:30 UTC (permalink / raw)
  To: Michael S . Tsirkin, Jason Wang, Konrad Rzeszutek Wilk,
	Christoph Hellwig
  Cc: Jens Axboe, virtualization, linux-block, linux-kernel, iommu,
	jfehlig, jon.grimm, brijesh.singh, joro, jroedel

Hi,

here is the third version of this patch-set. Previous
versions can be found here:

	V1: https://lore.kernel.org/lkml/20190110134433.15672-1-joro@8bytes.org/

	V2: https://lore.kernel.org/lkml/20190115132257.6426-1-joro@8bytes.org/

The problem solved here is a limitation of the SWIOTLB implementation,
which does not support allocations larger than 256kb.  When the
virtio-blk driver tries to read/write a block larger than that, the
allocation of the dma-handle fails and an IO error is reported.

Changes to v2 are:

	* Check if SWIOTLB is active before returning its limit in
	  dma_direct_max_mapping_size()

	* Only apply the maximum segment limit in virtio-blk when
	  DMA-API is used for the vring

Please review.

Thanks,

	Joerg

Joerg Roedel (5):
  swiotlb: Introduce swiotlb_max_mapping_size()
  swiotlb: Add is_swiotlb_active() function
  dma: Introduce dma_max_mapping_size()
  virtio: Introduce virtio_max_dma_size()
  virtio-blk: Consider virtio_max_dma_size() for maximum segment size

 drivers/block/virtio_blk.c   | 10 ++++++----
 drivers/virtio/virtio_ring.c | 10 ++++++++++
 include/linux/dma-mapping.h  | 16 ++++++++++++++++
 include/linux/swiotlb.h      | 11 +++++++++++
 include/linux/virtio.h       |  2 ++
 kernel/dma/direct.c          | 11 +++++++++++
 kernel/dma/swiotlb.c         | 10 ++++++++++
 7 files changed, 66 insertions(+), 4 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 60+ messages in thread
* [PATCH 0/5 v3] Fix virtio-blk issue with SWIOTLB
@ 2019-01-23 16:30 Joerg Roedel
  0 siblings, 0 replies; 60+ messages in thread
From: Joerg Roedel @ 2019-01-23 16:30 UTC (permalink / raw)
  To: Michael S . Tsirkin, Jason Wang, Konrad Rzeszutek Wilk,
	Christoph Hellwig
  Cc: Jens Axboe, jroedel, brijesh.singh, joro, jon.grimm, jfehlig,
	linux-kernel, linux-block, iommu, virtualization

Hi,

here is the third version of this patch-set. Previous
versions can be found here:

	V1: https://lore.kernel.org/lkml/20190110134433.15672-1-joro@8bytes.org/

	V2: https://lore.kernel.org/lkml/20190115132257.6426-1-joro@8bytes.org/

The problem solved here is a limitation of the SWIOTLB implementation,
which does not support allocations larger than 256kb.  When the
virtio-blk driver tries to read/write a block larger than that, the
allocation of the dma-handle fails and an IO error is reported.

Changes to v2 are:

	* Check if SWIOTLB is active before returning its limit in
	  dma_direct_max_mapping_size()

	* Only apply the maximum segment limit in virtio-blk when
	  DMA-API is used for the vring

Please review.

Thanks,

	Joerg

Joerg Roedel (5):
  swiotlb: Introduce swiotlb_max_mapping_size()
  swiotlb: Add is_swiotlb_active() function
  dma: Introduce dma_max_mapping_size()
  virtio: Introduce virtio_max_dma_size()
  virtio-blk: Consider virtio_max_dma_size() for maximum segment size

 drivers/block/virtio_blk.c   | 10 ++++++----
 drivers/virtio/virtio_ring.c | 10 ++++++++++
 include/linux/dma-mapping.h  | 16 ++++++++++++++++
 include/linux/swiotlb.h      | 11 +++++++++++
 include/linux/virtio.h       |  2 ++
 kernel/dma/direct.c          | 11 +++++++++++
 kernel/dma/swiotlb.c         | 10 ++++++++++
 7 files changed, 66 insertions(+), 4 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2019-01-29  7:38 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-23 16:30 [PATCH 0/5 v3] Fix virtio-blk issue with SWIOTLB Joerg Roedel
2019-01-23 16:30 ` [PATCH 1/5] swiotlb: Introduce swiotlb_max_mapping_size() Joerg Roedel
2019-01-23 16:30 ` Joerg Roedel
2019-01-23 21:28   ` Christoph Hellwig
2019-01-23 21:28     ` Christoph Hellwig
2019-01-24  8:24     ` Joerg Roedel
2019-01-24  8:47       ` Christoph Hellwig
2019-01-24  8:47       ` Christoph Hellwig
2019-01-24  8:24     ` Joerg Roedel
2019-01-23 21:28   ` Christoph Hellwig
2019-01-23 16:30 ` [PATCH 2/5] swiotlb: Add is_swiotlb_active() function Joerg Roedel
2019-01-23 16:30 ` Joerg Roedel
2019-01-23 21:27   ` Christoph Hellwig
2019-01-23 21:27   ` Christoph Hellwig
2019-01-24  8:29     ` Joerg Roedel
2019-01-24  8:29     ` Joerg Roedel
2019-01-24  8:41       ` Christoph Hellwig
2019-01-24  8:41       ` Christoph Hellwig
2019-01-24  8:41         ` Christoph Hellwig
2019-01-24 15:00         ` Joerg Roedel
2019-01-28 17:19           ` Michael S. Tsirkin
2019-01-28 17:19           ` Michael S. Tsirkin
2019-01-24 15:00         ` Joerg Roedel
2019-01-23 16:30 ` [PATCH 3/5] dma: Introduce dma_max_mapping_size() Joerg Roedel
2019-01-23 16:30 ` Joerg Roedel
2019-01-23 21:29   ` Christoph Hellwig
2019-01-23 21:29   ` Christoph Hellwig
2019-01-23 16:30 ` [PATCH 4/5] virtio: Introduce virtio_max_dma_size() Joerg Roedel
2019-01-23 16:30 ` Joerg Roedel
2019-01-23 16:30 ` [PATCH 5/5] virtio-blk: Consider virtio_max_dma_size() for maximum segment size Joerg Roedel
2019-01-23 16:30 ` Joerg Roedel
2019-01-23 21:31   ` Christoph Hellwig
2019-01-23 22:25     ` Michael S. Tsirkin
2019-01-23 22:25     ` Michael S. Tsirkin
2019-01-24  8:40     ` Joerg Roedel
2019-01-24  8:42       ` Christoph Hellwig
2019-01-24  8:42       ` Christoph Hellwig
2019-01-24  9:51         ` Joerg Roedel
2019-01-24  9:51           ` Joerg Roedel
2019-01-28  8:05           ` Christoph Hellwig
2019-01-28 17:14             ` Michael S. Tsirkin
2019-01-28 17:14             ` Michael S. Tsirkin
2019-01-29  7:38               ` Christoph Hellwig
2019-01-29  7:38               ` Christoph Hellwig
2019-01-28  8:05           ` Christoph Hellwig
2019-01-24  9:51         ` Joerg Roedel
2019-01-24  8:40     ` Joerg Roedel
2019-01-23 21:31   ` Christoph Hellwig
2019-01-23 17:09 ` [PATCH 0/5 v3] Fix virtio-blk issue with SWIOTLB Konrad Rzeszutek Wilk
2019-01-23 17:09 ` Konrad Rzeszutek Wilk
2019-01-23 18:51 ` Michael S. Tsirkin
2019-01-23 18:51 ` Michael S. Tsirkin
2019-01-23 21:14   ` Konrad Rzeszutek Wilk
2019-01-28 15:20     ` Michael S. Tsirkin
2019-01-28 15:53       ` Konrad Rzeszutek Wilk
2019-01-28 15:53         ` Konrad Rzeszutek Wilk
2019-01-28 15:53       ` Konrad Rzeszutek Wilk
2019-01-28 15:20     ` Michael S. Tsirkin
2019-01-23 21:14   ` Konrad Rzeszutek Wilk
2019-01-23 16:30 Joerg Roedel

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.