Skip to content

Commit 7f28785

Browse files
committed
tools headers uapi: Update tools's copy of linux/vhost.h
To get the changes in: c48300c ("vhost: fix VHOST_GET_BACKEND_FEATURES ioctl request definition") This makes 'perf trace' and other tools in the future using its beautifiers in a libbeauty.so library be able to translate these new ioctl to strings: $ tools/perf/trace/beauty/vhost_virtio_ioctl.sh > /tmp/after $ diff -u /tmp/before /tmp/after --- /tmp/before 2018-09-11 13:10:57.923038244 -0300 +++ /tmp/after 2018-09-11 13:11:20.329012685 -0300 @@ -15,6 +15,7 @@ [0x22] = "SET_VRING_ERR", [0x23] = "SET_VRING_BUSYLOOP_TIMEOUT", [0x24] = "GET_VRING_BUSYLOOP_TIMEOUT", + [0x25] = "SET_BACKEND_FEATURES", [0x30] = "NET_SET_BACKEND", [0x40] = "SCSI_SET_ENDPOINT", [0x41] = "SCSI_CLEAR_ENDPOINT", @@ -27,4 +28,5 @@ static const char *vhost_virtio_ioctl_read_cmds[] = { [0x00] = "GET_FEATURES", [0x12] = "GET_VRING_BASE", + [0x26] = "GET_BACKEND_FEATURES", }; $ We'll also use this to be able to express syscall filters using symbolic these symbolic names, something like: # perf trace --all-cpus -e ioctl(cmd=*GET_FEATURES) This silences the following warning during perf's build: 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 Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: David S. Miller <[email protected]> Cc: Gleb Fotengauer-Malinovskiy <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Wang Nan <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 0210c15 commit 7f28785

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tools/include/uapi/linux/vhost.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ struct vhost_iotlb_msg {
6565
};
6666

6767
#define VHOST_IOTLB_MSG 0x1
68+
#define VHOST_IOTLB_MSG_V2 0x2
6869

6970
struct vhost_msg {
7071
int type;
@@ -74,6 +75,15 @@ struct vhost_msg {
7475
};
7576
};
7677

78+
struct vhost_msg_v2 {
79+
__u32 type;
80+
__u32 reserved;
81+
union {
82+
struct vhost_iotlb_msg iotlb;
83+
__u8 padding[64];
84+
};
85+
};
86+
7787
struct vhost_memory_region {
7888
__u64 guest_phys_addr;
7989
__u64 memory_size; /* bytes */
@@ -160,6 +170,14 @@ struct vhost_memory {
160170
#define VHOST_GET_VRING_BUSYLOOP_TIMEOUT _IOW(VHOST_VIRTIO, 0x24, \
161171
struct vhost_vring_state)
162172

173+
/* Set or get vhost backend capability */
174+
175+
/* Use message type V2 */
176+
#define VHOST_BACKEND_F_IOTLB_MSG_V2 0x1
177+
178+
#define VHOST_SET_BACKEND_FEATURES _IOW(VHOST_VIRTIO, 0x25, __u64)
179+
#define VHOST_GET_BACKEND_FEATURES _IOR(VHOST_VIRTIO, 0x26, __u64)
180+
163181
/* VHOST_NET specific defines */
164182

165183
/* Attach virtio net ring to a raw socket, or tap device.

0 commit comments

Comments
 (0)