summaryrefslogtreecommitdiff
path: root/drivers/vhost/vdpa.c
diff options
context:
space:
mode:
authorGautam Dawar <gautam.dawar@xilinx.com>2022-03-30 21:03:52 +0300
committerMichael S. Tsirkin <mst@redhat.com>2022-05-31 19:44:30 +0300
commita0c95f201170bd559737d3cdc8a950aea62f29c6 (patch)
treec97c0587b979fb484e0f0e226035805fb93dad78 /drivers/vhost/vdpa.c
parent3ace88bd37436abc84906312146fe5158a469142 (diff)
downloadlinux-a0c95f201170bd559737d3cdc8a950aea62f29c6.tar.xz
vhost-vdpa: introduce uAPI to get the number of address spaces
This patch introduces the uAPI for getting the number of address spaces supported by this vDPA device. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Gautam Dawar <gdawar@xilinx.com> Message-Id: <20220330180436.24644-13-gdawar@xilinx.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/vdpa.c')
-rw-r--r--drivers/vhost/vdpa.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 92f78df0f685..a017011ad1f5 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -563,6 +563,9 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep,
r = copy_to_user(argp, &v->vdpa->ngroups,
sizeof(v->vdpa->ngroups));
break;
+ case VHOST_VDPA_GET_AS_NUM:
+ r = copy_to_user(argp, &v->vdpa->nas, sizeof(v->vdpa->nas));
+ break;
case VHOST_SET_LOG_BASE:
case VHOST_SET_LOG_FD:
r = -ENOIOCTLCMD;