Subject: linux-next: manual merge of the vhost tree with the net-next tree

From: Stephen Rothwell <[email-masked]>
Date: Thu, 17 Jul 2025 16:15:46 +1000

Hi all,

Today's linux-next merge of the vhost tree got conflicts in:

  drivers/vhost/net.c
  include/uapi/linux/vhost.h

between commits:

  333c515d1896 ("vhost-net: allow configuring extended features")
  bbca931fce26 ("vhost/net: enable gso over UDP tunnel support.")

from the net-next tree and commits:

  3206300e7af0 ("vhost: Reintroduce kthread API and add mode selection")
  3f466fdc0b91 ("vhost_net: basic in_order support")

from the vhost tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/vhost/net.c
index bfb774c273ea,8ac994b3228a..6edac0c1ba9b
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@@ -69,14 -69,13 +69,15 @@@ MODULE_PARM_DESC(experimental_zcopytx, 
  
  #define VHOST_DMA_IS_DONE(len) ((__force u32)(len) >= (__force u32)VHOST_DMA_DONE_LEN)
  
 -enum {
 -	VHOST_NET_FEATURES = VHOST_FEATURES |
 -			 (1ULL << VHOST_NET_F_VIRTIO_NET_HDR) |
 -			 (1ULL << VIRTIO_NET_F_MRG_RXBUF) |
 -			 (1ULL << VIRTIO_F_ACCESS_PLATFORM) |
 -			 (1ULL << VIRTIO_F_RING_RESET) |
 -			 (1ULL << VIRTIO_F_IN_ORDER)
 +static const u64 vhost_net_features[VIRTIO_FEATURES_DWORDS] = {
 +	VHOST_FEATURES |
 +	(1ULL << VHOST_NET_F_VIRTIO_NET_HDR) |
 +	(1ULL << VIRTIO_NET_F_MRG_RXBUF) |
 +	(1ULL << VIRTIO_F_ACCESS_PLATFORM) |
- 	(1ULL << VIRTIO_F_RING_RESET),
++	(1ULL << VIRTIO_F_RING_RESET) |
++	(1ULL << VIRTIO_F_IN_ORDER),
 +	VIRTIO_BIT(VIRTIO_NET_F_GUEST_UDP_TUNNEL_GSO) |
 +	VIRTIO_BIT(VIRTIO_NET_F_HOST_UDP_TUNNEL_GSO),
  };
  
  enum {
diff --cc include/uapi/linux/vhost.h
index d6ad01fbb8d2,e72f2655459e..c57674a6aa0d
--- a/include/uapi/linux/vhost.h
+++ b/include/uapi/linux/vhost.h
@@@ -236,10 -236,32 +236,38 @@@
  #define VHOST_VDPA_GET_VRING_SIZE	_IOWR(VHOST_VIRTIO, 0x82,	\
  					      struct vhost_vring_state)
  
 +/* Extended features manipulation */
 +#define VHOST_GET_FEATURES_ARRAY _IOR(VHOST_VIRTIO, 0x83, \
 +				       struct vhost_features_array)
 +#define VHOST_SET_FEATURES_ARRAY _IOW(VHOST_VIRTIO, 0x83, \
 +				       struct vhost_features_array)
 +
+ /* fork_owner values for vhost */
+ #define VHOST_FORK_OWNER_KTHREAD 0
+ #define VHOST_FORK_OWNER_TASK 1
+ 
+ /**
+  * VHOST_SET_FORK_FROM_OWNER - Set the fork_owner flag for the vhost device,
+  * This ioctl must called before VHOST_SET_OWNER.
+  * Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y
+  *
+  * @param fork_owner: An 8-bit value that determines the vhost thread mode
+  *
+  * When fork_owner is set to VHOST_FORK_OWNER_TASK(default value):
+  *   - Vhost will create vhost worker as tasks forked from the owner,
+  *     inheriting all of the owner's attributes.
+  *
+  * When fork_owner is set to VHOST_FORK_OWNER_KTHREAD:
+  *   - Vhost will create vhost workers as kernel threads.
+  */
 -#define VHOST_SET_FORK_FROM_OWNER _IOW(VHOST_VIRTIO, 0x83, __u8)
++#define VHOST_SET_FORK_FROM_OWNER _IOW(VHOST_VIRTIO, 0x84, __u8)
+ 
+ /**
+  * VHOST_GET_FORK_OWNER - Get the current fork_owner flag for the vhost device.
+  * Only available when CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y
+  *
+  * @return: An 8-bit value indicating the current thread mode.
+  */
 -#define VHOST_GET_FORK_FROM_OWNER _IOR(VHOST_VIRTIO, 0x84, __u8)
++#define VHOST_GET_FORK_FROM_OWNER _IOR(VHOST_VIRTIO, 0x85, __u8)
+ 
  #endif