virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Wendy Liang <wendy.liang@xilinx.com>
To: ohad@wizery.com, bjorn.andersson@linaro.org,
	linux-remoteproc@vger.kernel.org, mst@redhat.com,
	jasowang@redhat.com, virtualization@lists.linux-foundation.org
Cc: Wendy Liang <jliang@xilinx.com>
Subject: [RFC LINUX PATCH 0/2] Virtio ring works with DMA coherent memory
Date: Tue, 6 Dec 2016 10:21:28 -0800	[thread overview]
Message-ID: <1481048488-1026-1-git-send-email-jliang@xilinx.com> (raw)

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

-- 
1.9.1

             reply	other threads:[~2016-12-06 18:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06 18:21 Wendy Liang [this message]
2016-12-08  3:18 ` [RFC LINUX PATCH 0/2] Virtio ring works with DMA coherent memory Jason Wang
2016-12-08  5:57   ` Jiaying Liang
  -- strict thread matches above, loose matches on Subject: below --
2016-12-06 18:08 Wendy Liang
2016-11-22  0:32 Wendy Liang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1481048488-1026-1-git-send-email-jliang@xilinx.com \
    --to=wendy.liang@xilinx.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=jasowang@redhat.com \
    --cc=jliang@xilinx.com \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=ohad@wizery.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).