This patch introduces the uAPI for getting the number of address spaces supported by this vDPA device.
Unified · Split
| @@ -563,6 +563,9 @@ static long vhost_vdpa_unlocked_ioctl(struct file *filep, · 562 unmodified lines | |||
| 563 | r = copy_to_user(argp, &v->vdpa->ngroups, | 563 | r = copy_to_user(argp, &v->vdpa->ngroups, |
| 564 | sizeof(v->vdpa->ngroups)); | 564 | sizeof(v->vdpa->ngroups)); |
| 565 | break; | 565 | break; |
| 566 | case VHOST_VDPA_GET_AS_NUM: | ||
| 567 | r = copy_to_user(argp, &v->vdpa->nas, sizeof(v->vdpa->nas)); | ||
| 568 | break; | ||
| 566 | case VHOST_SET_LOG_BASE: | 569 | case VHOST_SET_LOG_BASE: |
| 567 | case VHOST_SET_LOG_FD: | 570 | case VHOST_SET_LOG_FD: |
| 568 | r = -ENOIOCTLCMD; | 571 | r = -ENOIOCTLCMD; |
| @@ -154,4 +154,6 @@ · 153 unmodified lines | |||
| 154 | /* Get the number of virtqueue groups. */ | 154 | /* Get the number of virtqueue groups. */ |
| 155 | #define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x81, __u32) | 155 | #define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x81, __u32) |
| 156 | 156 | ||
| 157 | /* Get the number of address spaces. */ | ||
| 158 | #define VHOST_VDPA_GET_AS_NUM _IOR(VHOST_VIRTIO, 0x7A, unsigned int) | ||
| 157 | #endif | 159 | #endif |