virtio_ring: introduce virtqueue_set_dma_premapped()
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>
Thu, 10 Aug 2023 12:30:48 +0000 (20:30 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Sun, 3 Sep 2023 22:10:22 +0000 (18:10 -0400)
commit8daafe9ebbd21a54bf91f9ff81decf215c203edd
tree9b15d6baeed8a4bf8c13aacdff9951f33d1e4aa3
parent0e27fa6ddeb0e070398692e369ce52fa91f9442d
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>
drivers/virtio/virtio_ring.c
include/linux/virtio.h