diff options
author | Xuan Zhuo <xuanzhuo@linux.alibaba.com> | 2023-08-10 20:30:50 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-09-03 18:10:23 -0400 |
commit | 2df64759071bdca2a12edb9af4f071e4419ad745 (patch) | |
tree | 93b5c07e34c34572f96514dd1366394cc0f27911 /include/linux | |
parent | d7344a2f71e38eb04fc16e3fef4f0580f42cbbd5 (diff) |
virtio_ring: introduce virtqueue_dma_dev()
Added virtqueue_dma_dev() to get DMA device for virtio. Then the
caller can do dma operation in advance. The purpose is to keep memory
mapped across multiple add/get buf operations.
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20230810123057.43407-6-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/virtio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/virtio.h b/include/linux/virtio.h index 8add38038877..bd55a05eec04 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -61,6 +61,8 @@ int virtqueue_add_sgs(struct virtqueue *vq, void *data, gfp_t gfp); +struct device *virtqueue_dma_dev(struct virtqueue *vq); + bool virtqueue_kick(struct virtqueue *vq); bool virtqueue_kick_prepare(struct virtqueue *vq); |