Skip to content

Commit e2213a2

Browse files
committed
tools include UAPI: Sync linux/vhost.h with the kernel sources
To get the changes in: 84d7c8f ("vhost-vdpa: introduce uAPI to set group ASID") 2d1fcb7 ("vhost-vdpa: uAPI to get virtqueue group id") a0c95f2 ("vhost-vdpa: introduce uAPI to get the number of address spaces") 3ace88b ("vhost-vdpa: introduce uAPI to get the number of virtqueue groups") 175d493 ("vhost: move the backend feature bits to vhost_types.h") Silencing this perf build warning: Warning: Kernel ABI header at 'tools/include/uapi/linux/vhost.h' differs from latest version at 'include/uapi/linux/vhost.h' diff -u tools/include/uapi/linux/vhost.h include/uapi/linux/vhost.h To pick up these changes and support them: $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > before $ cp include/uapi/linux/vhost.h tools/include/uapi/linux/vhost.h $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > after $ diff -u before after --- before 2022-06-26 12:04:35.982003781 -0300 +++ after 2022-06-26 12:04:43.819972476 -0300 @@ -28,6 +28,7 @@ [0x74] = "VDPA_SET_CONFIG", [0x75] = "VDPA_SET_VRING_ENABLE", [0x77] = "VDPA_SET_CONFIG_CALL", + [0x7C] = "VDPA_SET_GROUP_ASID", }; static const char *vhost_virtio_ioctl_read_cmds[] = { [0x00] = "GET_FEATURES", @@ -39,5 +40,8 @@ [0x76] = "VDPA_GET_VRING_NUM", [0x78] = "VDPA_GET_IOVA_RANGE", [0x79] = "VDPA_GET_CONFIG_SIZE", + [0x7A] = "VDPA_GET_AS_NUM", + [0x7B] = "VDPA_GET_VRING_GROUP", [0x80] = "VDPA_GET_VQS_COUNT", + [0x81] = "VDPA_GET_GROUP_NUM", }; $ Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Gautam Dawar <gautam.dawar@xilinx.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/lkml/Yrh3xMYbfeAD0MFL@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 448ce0e commit e2213a2

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

tools/include/uapi/linux/vhost.h

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@
8989

9090
/* Set or get vhost backend capability */
9191

92-
/* Use message type V2 */
93-
#define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
94-
/* IOTLB can accept batching hints */
95-
#define VHOST_BACKEND_F_IOTLB_BATCH 0x2
96-
9792
#define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
9893
#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
9994

@@ -150,11 +145,30 @@
150145
/* Get the valid iova range */
151146
#define VHOST_VDPA_GET_IOVA_RANGE _IOR(VHOST_VIRTIO, 0x78, \
152147
struct vhost_vdpa_iova_range)
153-
154148
/* Get the config size */
155149
#define VHOST_VDPA_GET_CONFIG_SIZE _IOR(VHOST_VIRTIO, 0x79, __u32)
156150

157151
/* Get the count of all virtqueues */
158152
#define VHOST_VDPA_GET_VQS_COUNT _IOR(VHOST_VIRTIO, 0x80, __u32)
159153

154+
/* Get the number of virtqueue groups. */
155+
#define VHOST_VDPA_GET_GROUP_NUM _IOR(VHOST_VIRTIO, 0x81, __u32)
156+
157+
/* Get the number of address spaces. */
158+
#define VHOST_VDPA_GET_AS_NUM _IOR(VHOST_VIRTIO, 0x7A, unsigned int)
159+
160+
/* Get the group for a virtqueue: read index, write group in num,
161+
* The virtqueue index is stored in the index field of
162+
* vhost_vring_state. The group for this specific virtqueue is
163+
* returned via num field of vhost_vring_state.
164+
*/
165+
#define VHOST_VDPA_GET_VRING_GROUP _IOWR(VHOST_VIRTIO, 0x7B, \
166+
struct vhost_vring_state)
167+
/* Set the ASID for a virtqueue group. The group index is stored in
168+
* the index field of vhost_vring_state, the ASID associated with this
169+
* group is stored at num field of vhost_vring_state.
170+
*/
171+
#define VHOST_VDPA_SET_GROUP_ASID _IOW(VHOST_VIRTIO, 0x7C, \
172+
struct vhost_vring_state)
173+
160174
#endif

0 commit comments

Comments
 (0)