Skip to content

Commit

Permalink
vdpa: introduce config operations for associating ASID to a virtqueue…
Browse files Browse the repository at this point in the history
… 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 <[email protected]>
Signed-off-by: Gautam Dawar <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
  • Loading branch information
Gautam Dawar authored and mstsirkin committed May 31, 2022
1 parent db9adcb commit 46d554b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/linux/vdpa.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 46d554b

Please sign in to comment.