Skip to content

RFC Virtio ring works with DMA coherent memory

Wendy Liang linux-remoteproc virtualization 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2virtio_ring: Do not call dma_map_page if sg is already mapped.drivers/virtio/virtio_ring.c+6 -00 replies
2/2rpmsg: DMA map sgs passed to virtiodrivers/rpmsg/virtio_rpmsg_bus.c+19 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC LINUX PATCH 0/2] Virtio ring works with DMA coherent memory

RPMsg uses dma_alloc_coherent() to allocate memory to shared with the remote. In this case, as there is no pages setup in the dma_alloc_coherent(), we cannot get the physical address back from the virtual address, and thus, we can set the sg_dma_addr to store the DMA address and mark it already DMA mapped.

When virtio vring sees the sg_dma_addr is ready set, do not call dma_map_page().

The issue was once discussed here:
http://virtualization.linux-foundation.narkive.com/CfVP32Vy/rfc-0-4-rpmsg-fix-init-of-dma-able-virtqueues

Edgar E. Iglesias (1):
rpmsg: DMA map sgs passed to virtio

Wendy Liang (1):
virtio_ring: Do not call dma_map_page if sg is already mapped.

 drivers/rpmsg/virtio_rpmsg_bus.c | 22 +++++++++++++++++++---
 drivers/virtio/virtio_ring.c     |  6 ++++++
 2 files changed, 25 insertions(+), 3 deletions(-)
Signature · 1 line
1.9.1