diff options
author | Gautam Dawar <gautam.dawar@xilinx.com> | 2022-03-30 23:33:47 +0530 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-05-31 12:44:28 -0400 |
commit | 46d554b1bcd19133401d2d5c0728b85e7bfd1358 (patch) | |
tree | be84a3e89d3dcbc5f4ba001cd6dc6335b7beba8d /include/linux/vdpa.h | |
parent | db9adcbf4286ad1c1fca091a870db6e49bb0df07 (diff) |
vdpa: introduce config operations for associating ASID to a virtqueue group
This patch introduces a new bus operation to allow the vDPA bus driver
to associate an ASID to a virtqueue group.
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Gautam Dawar <gdawar@xilinx.com>
Message-Id: <20220330180436.24644-8-gdawar@xilinx.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/vdpa.h')
-rw-r--r-- | include/linux/vdpa.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h index 1515748e84ff..f336d253db3d 100644 --- a/include/linux/vdpa.h +++ b/include/linux/vdpa.h @@ -240,6 +240,12 @@ struct vdpa_map_file { * @vdev: vdpa device * Returns the iova range supported by * the device. + * @set_group_asid: Set address space identifier for a + * virtqueue group + * @vdev: vdpa device + * @group: virtqueue group + * @asid: address space id for this group + * Returns integer: success (0) or error (< 0) * @set_map: Set device memory mapping (optional) * Needed for device that using device * specific DMA translation (on-chip IOMMU) @@ -325,6 +331,8 @@ struct vdpa_config_ops { u64 iova, u64 size, u64 pa, u32 perm, void *opaque); int (*dma_unmap)(struct vdpa_device *vdev, unsigned int asid, u64 iova, u64 size); + int (*set_group_asid)(struct vdpa_device *vdev, unsigned int group, + unsigned int asid); /* Free device resources */ void (*free)(struct vdpa_device *vdev); |