Skip to content

Commit f79a62f

Browse files
committed
tools headers: Sync uapi/linux/vhost.h with the kernel source
To pick up the changes in this cset: 7d9896e vhost: Reintroduce kthread API and add mode selection 333c515 vhost-net: allow configuring extended features This addresses these perf build warnings: Warning: Kernel ABI header differences: diff -u tools/perf/trace/beauty/include/uapi/linux/vhost.h include/uapi/linux/vhost.h Please see tools/include/uapi/README for further details. Cc: "Michael S. Tsirkin" <[email protected]> Cc: Jason Wang <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent e7e79e9 commit f79a62f

File tree

1 file changed

+35
-0
lines changed
  • tools/perf/trace/beauty/include/uapi/linux

1 file changed

+35
-0
lines changed

tools/perf/trace/beauty/include/uapi/linux/vhost.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,39 @@
235235
*/
236236
#define VHOST_VDPA_GET_VRING_SIZE _IOWR(VHOST_VIRTIO, 0x82, \
237237
struct vhost_vring_state)
238+
239+
/* Extended features manipulation */
240+
#define VHOST_GET_FEATURES_ARRAY _IOR(VHOST_VIRTIO, 0x83, \
241+
struct vhost_features_array)
242+
#define VHOST_SET_FEATURES_ARRAY _IOW(VHOST_VIRTIO, 0x83, \
243+
struct vhost_features_array)
244+
245+
/* fork_owner values for vhost */
246+
#define VHOST_FORK_OWNER_KTHREAD 0
247+
#define VHOST_FORK_OWNER_TASK 1
248+
249+
/**
250+
* VHOST_SET_FORK_FROM_OWNER - Set the fork_owner flag for the vhost device,
251+
* This ioctl must called before VHOST_SET_OWNER.
252+
* Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y
253+
*
254+
* @param fork_owner: An 8-bit value that determines the vhost thread mode
255+
*
256+
* When fork_owner is set to VHOST_FORK_OWNER_TASK(default value):
257+
* - Vhost will create vhost worker as tasks forked from the owner,
258+
* inheriting all of the owner's attributes.
259+
*
260+
* When fork_owner is set to VHOST_FORK_OWNER_KTHREAD:
261+
* - Vhost will create vhost workers as kernel threads.
262+
*/
263+
#define VHOST_SET_FORK_FROM_OWNER _IOW(VHOST_VIRTIO, 0x84, __u8)
264+
265+
/**
266+
* VHOST_GET_FORK_OWNER - Get the current fork_owner flag for the vhost device.
267+
* Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y
268+
*
269+
* @return: An 8-bit value indicating the current thread mode.
270+
*/
271+
#define VHOST_GET_FORK_FROM_OWNER _IOR(VHOST_VIRTIO, 0x85, __u8)
272+
238273
#endif

0 commit comments

Comments
 (0)