diff options
author | Jason Wang <jasowang@redhat.com> | 2023-01-19 14:15:22 +0800 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2023-02-20 19:26:58 -0500 |
commit | 25da258fa61b1a902c781406a4e24a8284fc3d8a (patch) | |
tree | bd8c947ff585839d6bf95bc6124391abb9ac7ba5 /include/linux/vdpa.h | |
parent | 2713ea3c7d930aa1ff5ef7d4a57a1e4fcc3b9985 (diff) | |
download | linux-25da258fa61b1a902c781406a4e24a8284fc3d8a.tar.gz linux-25da258fa61b1a902c781406a4e24a8284fc3d8a.tar.bz2 linux-25da258fa61b1a902c781406a4e24a8284fc3d8a.zip |
vdpa: introduce get_vq_dma_device()
This patch introduces a new method to query the dma device that is use
for a specific virtqueue.
Reviewed-by: Eli Cohen <elic@nvidia.com>
Tested-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20230119061525.75068-3-jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/vdpa.h')
-rw-r--r-- | include/linux/vdpa.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 96d308cbf97b..43f59ef10cc9 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -285,6 +285,11 @@ struct vdpa_map_file { * @iova: iova to be unmapped * @size: size of the area * Returns integer: success (0) or error (< 0) + * @get_vq_dma_dev: Get the dma device for a specific + * virtqueue (optional) + * @vdev: vdpa device + * @idx: virtqueue index + * Returns pointer to structure device or error (NULL) * @free: Free resources that belongs to vDPA (optional) * @vdev: vdpa device */ @@ -345,6 +350,7 @@ struct vdpa_config_ops { u64 iova, u64 size); int (*set_group_asid)(struct vdpa_device *vdev, unsigned int group, unsigned int asid); + struct device *(*get_vq_dma_dev)(struct vdpa_device *vdev, u16 idx); /* Free device resources */ void (*free)(struct vdpa_device *vdev); |