Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Gautam Dawar and committed by
Michael S. Tsirkin
46d554b1 db9adcbf

+8
+8
include/linux/vdpa.h
··· 240 240 * @vdev: vdpa device 241 241 * Returns the iova range supported by 242 242 * the device. 243 + * @set_group_asid: Set address space identifier for a 244 + * virtqueue group 245 + * @vdev: vdpa device 246 + * @group: virtqueue group 247 + * @asid: address space id for this group 248 + * Returns integer: success (0) or error (< 0) 243 249 * @set_map: Set device memory mapping (optional) 244 250 * Needed for device that using device 245 251 * specific DMA translation (on-chip IOMMU) ··· 331 325 u64 iova, u64 size, u64 pa, u32 perm, void *opaque); 332 326 int (*dma_unmap)(struct vdpa_device *vdev, unsigned int asid, 333 327 u64 iova, u64 size); 328 + int (*set_group_asid)(struct vdpa_device *vdev, unsigned int group, 329 + unsigned int asid); 334 330 335 331 /* Free device resources */ 336 332 void (*free)(struct vdpa_device *vdev);