Skip to content

Commit 857eb3e

Browse files
namhyunggregkh
authored andcommitted
vhost: Fix ioctl # for VHOST_[GS]ET_FORK_FROM_OWNER
[ Upstream commit 24fc631 ] The VHOST_[GS]ET_FEATURES_ARRAY ioctl already took 0x83 and it would result in a build error when the vhost uapi header is used for perf tool build like below. In file included from trace/beauty/ioctl.c:93: tools/perf/trace/beauty/generated/ioctl/vhost_virtio_ioctl_array.c: In function ‘ioctl__scnprintf_vhost_virtio_cmd’: tools/perf/trace/beauty/generated/ioctl/vhost_virtio_ioctl_array.c:36:18: error: initialized field overwritten [-Werror=override-init] 36 | [0x83] = "SET_FORK_FROM_OWNER", | ^~~~~~~~~~~~~~~~~~~~~ tools/perf/trace/beauty/generated/ioctl/vhost_virtio_ioctl_array.c:36:18: note: (near initialization for ‘vhost_virtio_ioctl_cmds[131]’) Fixes: 7d9896e ("vhost: Reintroduce kthread API and add mode selection") Signed-off-by: Namhyung Kim <namhyung@kernel.org> Message-Id: <20250819063958.833770-1-namhyung@kernel.org> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent ba97b7a commit 857eb3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/uapi/linux/vhost.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,14 @@
254254
* When fork_owner is set to VHOST_FORK_OWNER_KTHREAD:
255255
* - Vhost will create vhost workers as kernel threads.
256256
*/
257-
#define VHOST_SET_FORK_FROM_OWNER _IOW(VHOST_VIRTIO, 0x83, __u8)
257+
#define VHOST_SET_FORK_FROM_OWNER _IOW(VHOST_VIRTIO, 0x84, __u8)
258258

259259
/**
260260
* VHOST_GET_FORK_OWNER - Get the current fork_owner flag for the vhost device.
261261
* Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y
262262
*
263263
* @return: An 8-bit value indicating the current thread mode.
264264
*/
265-
#define VHOST_GET_FORK_FROM_OWNER _IOR(VHOST_VIRTIO, 0x84, __u8)
265+
#define VHOST_GET_FORK_FROM_OWNER _IOR(VHOST_VIRTIO, 0x85, __u8)
266266

267267
#endif

0 commit comments

Comments
 (0)