Skip to content

Commit 3df4d4b

Browse files
committed
tools include UAPI: Sync linux/vhost.h with the kernel sources
To get the changes in: 4c8cf31 ("vhost: introduce vDPA-based backend") 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 This automatically picks these new ioctls, making tools such as 'perf trace' aware of them and possibly allowing to use the strings in filters, etc: $ 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 2020-04-14 09:12:28.559748968 -0300 +++ after 2020-04-14 09:12:38.781696242 -0300 @@ -24,9 +24,16 @@ [0x44] = "SCSI_GET_EVENTS_MISSED", [0x60] = "VSOCK_SET_GUEST_CID", [0x61] = "VSOCK_SET_RUNNING", + [0x72] = "VDPA_SET_STATUS", + [0x74] = "VDPA_SET_CONFIG", + [0x75] = "VDPA_SET_VRING_ENABLE", }; static const char *vhost_virtio_ioctl_read_cmds[] = { [0x00] = "GET_FEATURES", [0x12] = "GET_VRING_BASE", [0x26] = "GET_BACKEND_FEATURES", + [0x70] = "VDPA_GET_DEVICE_ID", + [0x71] = "VDPA_GET_STATUS", + [0x73] = "VDPA_GET_CONFIG", + [0x76] = "VDPA_GET_VRING_NUM", }; $ Cc: Adrian Hunter <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Michael S. Tsirkin <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Tiwei Bie <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent e00a2d9 commit 3df4d4b

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

tools/include/uapi/linux/vhost.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,28 @@
116116
#define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64)
117117
#define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int)
118118

119+
/* VHOST_VDPA specific defines */
120+
121+
/* Get the device id. The device ids follow the same definition of
122+
* the device id defined in virtio-spec.
123+
*/
124+
#define VHOST_VDPA_GET_DEVICE_ID _IOR(VHOST_VIRTIO, 0x70, __u32)
125+
/* Get and set the status. The status bits follow the same definition
126+
* of the device status defined in virtio-spec.
127+
*/
128+
#define VHOST_VDPA_GET_STATUS _IOR(VHOST_VIRTIO, 0x71, __u8)
129+
#define VHOST_VDPA_SET_STATUS _IOW(VHOST_VIRTIO, 0x72, __u8)
130+
/* Get and set the device config. The device config follows the same
131+
* definition of the device config defined in virtio-spec.
132+
*/
133+
#define VHOST_VDPA_GET_CONFIG _IOR(VHOST_VIRTIO, 0x73, \
134+
struct vhost_vdpa_config)
135+
#define VHOST_VDPA_SET_CONFIG _IOW(VHOST_VIRTIO, 0x74, \
136+
struct vhost_vdpa_config)
137+
/* Enable/disable the ring. */
138+
#define VHOST_VDPA_SET_VRING_ENABLE _IOW(VHOST_VIRTIO, 0x75, \
139+
struct vhost_vring_state)
140+
/* Get the max ring size. */
141+
#define VHOST_VDPA_GET_VRING_NUM _IOR(VHOST_VIRTIO, 0x76, __u16)
142+
119143
#endif

0 commit comments

Comments
 (0)