diff options
author | Xuan Zhuo | 2023-08-10 20:30:48 +0800 |
---|---|---|
committer | Michael S. Tsirkin | 2023-09-03 18:10:22 -0400 |
commit | 8daafe9ebbd21a54bf91f9ff81decf215c203edd (patch) | |
tree | 9b15d6baeed8a4bf8c13aacdff9951f33d1e4aa3 /include/linux | |
parent | 0e27fa6ddeb0e070398692e369ce52fa91f9442d (diff) |
virtio_ring: introduce virtqueue_set_dma_premapped()
This helper allows the driver change the dma mode to premapped mode.
Under the premapped mode, the virtio core do not do dma mapping
internally.
This just work when the use_dma_api is true. If the use_dma_api is false,
the dma options is not through the DMA APIs, that is not the standard
way of the linux kernel.
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Message-Id: <20230810123057.43407-4-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 de6041deee37..8add38038877 100644 --- a/include/linux/virtio.h +++ b/include/linux/virtio.h @@ -78,6 +78,8 @@ bool virtqueue_enable_cb(struct virtqueue *vq); unsigned virtqueue_enable_cb_prepare(struct virtqueue *vq); +int virtqueue_set_dma_premapped(struct virtqueue *_vq); + bool virtqueue_poll(struct virtqueue *vq, unsigned); bool virtqueue_enable_cb_delayed(struct virtqueue *vq); |