summaryrefslogtreecommitdiff
path: root/drivers/vdpa/vdpa.c
diff options
context:
space:
mode:
authorGautam Dawar <gautam.dawar@xilinx.com>2022-03-30 21:03:45 +0300
committerMichael S. Tsirkin <mst@redhat.com>2022-05-31 19:44:27 +0300
commitd4821902e43453b85b31329441a9f6ac071228a8 (patch)
tree0414b5c89a71368fbce8af6ef5ef1129d28f5cdd /drivers/vdpa/vdpa.c
parent0b7ee47c5f36634926def0142a515eafedc8a779 (diff)
downloadlinux-d4821902e43453b85b31329441a9f6ac071228a8.tar.xz
vdpa: introduce virtqueue groups
This patch introduces virtqueue groups to vDPA device. The virtqueue group is the minimal set of virtqueues that must share an address space. And the address space identifier could only be attached to a specific virtqueue group. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Gautam Dawar <gdawar@xilinx.com> Message-Id: <20220330180436.24644-6-gdawar@xilinx.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vdpa/vdpa.c')
-rw-r--r--drivers/vdpa/vdpa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/vdpa/vdpa.c b/drivers/vdpa/vdpa.c
index 9d3534a0bc5f..4ca54779be2c 100644
--- a/drivers/vdpa/vdpa.c
+++ b/drivers/vdpa/vdpa.c
@@ -158,6 +158,7 @@ static void vdpa_release_dev(struct device *d)
* initialized but before registered.
* @parent: the parent device
* @config: the bus operations that is supported by this device
+ * @ngroups: number of groups supported by this device
* @size: size of the parent structure that contains private data
* @name: name of the vdpa device; optional.
* @use_va: indicate whether virtual address must be used by this device
@@ -170,6 +171,7 @@ static void vdpa_release_dev(struct device *d)
*/
struct vdpa_device *__vdpa_alloc_device(struct device *parent,
const struct vdpa_config_ops *config,
+ unsigned int ngroups,
size_t size, const char *name,
bool use_va)
{
@@ -202,6 +204,7 @@ struct vdpa_device *__vdpa_alloc_device(struct device *parent,
vdev->config = config;
vdev->features_valid = false;
vdev->use_va = use_va;
+ vdev->ngroups = ngroups;
if (name)
err = dev_set_name(&vdev->dev, "%s", name);