mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
virtio_ring: introduce dma sync api for virtqueue
These API has been introduced: * virtqueue_dma_need_sync * virtqueue_dma_sync_single_range_for_cpu * virtqueue_dma_sync_single_range_for_device These APIs can be used together with the premapped mechanism to sync the DMA address. Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Message-Id: <20230810123057.43407-12-xuanzhuo@linux.alibaba.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
b6253b4e21
commit
8bd2f71054
@@ -220,4 +220,12 @@ void virtqueue_dma_unmap_single_attrs(struct virtqueue *_vq, dma_addr_t addr,
|
||||
size_t size, enum dma_data_direction dir,
|
||||
unsigned long attrs);
|
||||
int virtqueue_dma_mapping_error(struct virtqueue *_vq, dma_addr_t addr);
|
||||
|
||||
bool virtqueue_dma_need_sync(struct virtqueue *_vq, dma_addr_t addr);
|
||||
void virtqueue_dma_sync_single_range_for_cpu(struct virtqueue *_vq, dma_addr_t addr,
|
||||
unsigned long offset, size_t size,
|
||||
enum dma_data_direction dir);
|
||||
void virtqueue_dma_sync_single_range_for_device(struct virtqueue *_vq, dma_addr_t addr,
|
||||
unsigned long offset, size_t size,
|
||||
enum dma_data_direction dir);
|
||||
#endif /* _LINUX_VIRTIO_H */
|
||||
|
||||
Reference in New Issue
Block a user