[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220330180436.24644-8-gdawar@xilinx.com>
Date: Wed, 30 Mar 2022 23:33:47 +0530
From: Gautam Dawar <gautam.dawar@...inx.com>
To: "Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>, <kvm@...r.kernel.org>,
<virtualization@...ts.linux-foundation.org>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <martinh@...inx.com>, <hanand@...inx.com>, <martinpo@...inx.com>,
<pabloc@...inx.com>, <dinang@...inx.com>, <tanuj.kamde@....com>,
<habetsm.xilinx@...il.com>, <ecree.xilinx@...il.com>,
<eperezma@...hat.com>, Gautam Dawar <gdawar@...inx.com>,
Wu Zongyong <wuzongyong@...ux.alibaba.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
Eli Cohen <elic@...dia.com>,
Zhu Lingshan <lingshan.zhu@...el.com>,
Stefano Garzarella <sgarzare@...hat.com>,
Xie Yongji <xieyongji@...edance.com>,
Si-Wei Liu <si-wei.liu@...cle.com>,
Parav Pandit <parav@...dia.com>,
Longpeng <longpeng2@...wei.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Zhang Min <zhang.min9@....com.cn>
Subject: [PATCH v2 07/19] 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@...hat.com>
Signed-off-by: Gautam Dawar <gdawar@...inx.com>
---
include/linux/vdpa.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h
index 7ab0e29ae466..f4d8c916e0d8 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)
@@ -322,6 +328,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);
--
2.30.1
Powered by blists - more mailing lists