vhost-vdpa: introduce uAPI to get the number of address spaces
[linux-2.6-microblaze.git] / drivers / vhost / vdpa.c
index 92f78df..a017011 100644 (file)
@@ -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;