<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/drivers/vhost, branch stable</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/drivers/vhost?h=stable</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/drivers/vhost?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2025-10-01T11:24:43Z</updated>
<entry>
<title>vdpa: support virtio_map</title>
<updated>2025-10-01T11:24:43Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2025-08-21T06:46:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=58aca3dbc7d8891a016cb17d488af3002812793b'/>
<id>urn:sha1:58aca3dbc7d8891a016cb17d488af3002812793b</id>
<content type='text'>
Virtio core switches from DMA device to virtio_map, let's do that
as well for vDPA.

Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Message-Id: &lt;20250821064641.5025-8-jasowang@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Tested-by: Lei Yang &lt;leiyang@redhat.com&gt;
Reviewed-by: Eugenio Pérez &lt;eperezma@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost: vringh: Fix copy_to_iter return value check</title>
<updated>2025-10-01T11:24:31Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2025-09-23T21:44:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c0e1116189acfec74c8f5032da257b954d3f757f'/>
<id>urn:sha1:c0e1116189acfec74c8f5032da257b954d3f757f</id>
<content type='text'>
The return value of copy_to_iter can't be negative, check whether the
copied length is equal to the requested length instead of checking for
negative values.

Fixes: 309bba39c945 ("vringh: iterate on iotlb_translate to handle large translations")
Cc: "Stefano Garzarella" &lt;sgarzare@redhat.com&gt;
Cc: zhang jiao &lt;zhangjiao2@cmss.chinamobile.com&gt;
Link: https://lore.kernel.org/all/20250910091739.2999-1-zhangjiao2@cmss.chinamobile.com
Message-ID: &lt;cd637504a6e3967954a9e80fc1b75e8c0978087b.1758723310.git.mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost: vringh: Modify the return value check</title>
<updated>2025-10-01T11:24:20Z</updated>
<author>
<name>zhang jiao</name>
<email>zhangjiao2@cmss.chinamobile.com</email>
</author>
<published>2025-09-10T09:17:38Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=82a8d0fda55b35361ee7f35b54fa2b66d7847d2b'/>
<id>urn:sha1:82a8d0fda55b35361ee7f35b54fa2b66d7847d2b</id>
<content type='text'>
The return value of copy_from_iter and copy_to_iter can't be negative,
check whether the copied lengths are equal.

Fixes: 309bba39c945 ("vringh: iterate on iotlb_translate to handle large translations")
Cc: "Stefano Garzarella" &lt;sgarzare@redhat.com&gt;
Signed-off-by: zhang jiao &lt;zhangjiao2@cmss.chinamobile.com&gt;
Message-Id: &lt;20250910091739.2999-1-zhangjiao2@cmss.chinamobile.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost-net: flush batched before enabling notifications</title>
<updated>2025-09-19T08:15:26Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2025-09-17T06:30:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e430451613c7a27beeadd00d707bcf7ceec6328e'/>
<id>urn:sha1:e430451613c7a27beeadd00d707bcf7ceec6328e</id>
<content type='text'>
Commit 8c2e6b26ffe2 ("vhost/net: Defer TX queue re-enable until after
sendmsg") tries to defer the notification enabling by moving the logic
out of the loop after the vhost_tx_batch() when nothing new is spotted.
This caused unexpected side effects as the new logic is reused for
several other error conditions.

A previous patch reverted 8c2e6b26ffe2. Now, bring the performance
back up by flushing batched buffers before enabling notifications.

Reported-by: Jon Kohler &lt;jon@nutanix.com&gt;
Cc: stable@vger.kernel.org
Fixes: 8c2e6b26ffe2 ("vhost/net: Defer TX queue re-enable until after sendmsg")
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20250917063045.2042-3-jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>Revert "vhost/net: Defer TX queue re-enable until after sendmsg"</title>
<updated>2025-09-19T08:15:26Z</updated>
<author>
<name>Michael S. Tsirkin</name>
<email>mst@redhat.com</email>
</author>
<published>2025-09-17T06:30:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=4174152771bf0d014d58f7d7e148bb0c8830fe53'/>
<id>urn:sha1:4174152771bf0d014d58f7d7e148bb0c8830fe53</id>
<content type='text'>
This reverts commit 8c2e6b26ffe243be1e78f5a4bfb1a857d6e6f6d6. It tries
to defer the notification enabling by moving the logic out of the loop
after the vhost_tx_batch() when nothing new is spotted. This will
bring side effects as the new logic would be reused for several other
error conditions.

One example is the IOTLB: when there's an IOTLB miss, get_tx_bufs()
might return -EAGAIN and exit the loop and see there's still available
buffers, so it will queue the tx work again until userspace feed the
IOTLB entry correctly. This will slowdown the tx processing and
trigger the TX watchdog in the guest as reported in
https://lkml.org/lkml/2025/9/10/1596.

To fix, revert the change. A follow up patch will bring the performance
back in a safe way.

Reported-by: Jon Kohler &lt;jon@nutanix.com&gt;
Cc: stable@vger.kernel.org
Fixes: 8c2e6b26ffe2 ("vhost/net: Defer TX queue re-enable until after sendmsg")
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20250917063045.2042-2-jasowang@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost-net: unbreak busy polling</title>
<updated>2025-09-19T08:15:26Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2025-09-17T06:30:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=90beccb3e1287b8d596c4816530ef54df01aa11f'/>
<id>urn:sha1:90beccb3e1287b8d596c4816530ef54df01aa11f</id>
<content type='text'>
Commit 67a873df0c41 ("vhost: basic in order support") pass the number
of used elem to vhost_net_rx_peek_head_len() to make sure it can
signal the used correctly before trying to do busy polling. But it
forgets to clear the count, this would cause the count run out of sync
with handle_rx() and break the busy polling.

Fixing this by passing the pointer of the count and clearing it after
the signaling the used.

Acked-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Cc: stable@vger.kernel.org
Fixes: 67a873df0c41 ("vhost: basic in order support")
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Message-Id: &lt;20250917063045.2042-1-jasowang@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost-scsi: fix argument order in tport allocation error message</title>
<updated>2025-09-15T22:25:58Z</updated>
<author>
<name>Alok Tiwari</name>
<email>alok.a.tiwari@oracle.com</email>
</author>
<published>2025-09-13T15:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=a318eb807825d71900e212f5aab3469e86feff8e'/>
<id>urn:sha1:a318eb807825d71900e212f5aab3469e86feff8e</id>
<content type='text'>
The error log in vhost_scsi_make_tport() prints the arguments in the
wrong order, producing confusing output. For example, when creating a
target with a name in WWNN format such as "fc.port1234", the log
looks like:

  Emulated fc.port1234 Address: FCP, exceeds max: 64

Instead, the message should report the emulated protocol type first,
followed by the configfs name as:

  Emulated FCP Address: fc.port1234, exceeds max: 64

Fix the argument order so the error log is consistent and clear.

Signed-off-by: Alok Tiwari &lt;alok.a.tiwari@oracle.com&gt;
Message-Id: &lt;20250913154106.3995856-1-alok.a.tiwari@oracle.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost/net: Protect ubufs with rcu read lock in vhost_net_ubuf_put()</title>
<updated>2025-08-26T07:38:10Z</updated>
<author>
<name>Nikolay Kuratov</name>
<email>kniv@yandex-team.ru</email>
</author>
<published>2025-08-05T13:09:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=dd54bcf86c91a4455b1f95cbc8e9ac91205f3193'/>
<id>urn:sha1:dd54bcf86c91a4455b1f95cbc8e9ac91205f3193</id>
<content type='text'>
When operating on struct vhost_net_ubuf_ref, the following execution
sequence is theoretically possible:
CPU0 is finalizing DMA operation                   CPU1 is doing VHOST_NET_SET_BACKEND
                             // ubufs-&gt;refcount == 2
vhost_net_ubuf_put()                               vhost_net_ubuf_put_wait_and_free(oldubufs)
                                                     vhost_net_ubuf_put_and_wait()
                                                       vhost_net_ubuf_put()
                                                         int r = atomic_sub_return(1, &amp;ubufs-&gt;refcount);
                                                         // r = 1
int r = atomic_sub_return(1, &amp;ubufs-&gt;refcount);
// r = 0
                                                      wait_event(ubufs-&gt;wait, !atomic_read(&amp;ubufs-&gt;refcount));
                                                      // no wait occurs here because condition is already true
                                                    kfree(ubufs);
if (unlikely(!r))
  wake_up(&amp;ubufs-&gt;wait);  // use-after-free

This leads to use-after-free on ubufs access. This happens because CPU1
skips waiting for wake_up() when refcount is already zero.

To prevent that use a read-side RCU critical section in vhost_net_ubuf_put(),
as suggested by Hillf Danton. For this lock to take effect, free ubufs with
kfree_rcu().

Cc: stable@vger.kernel.org
Fixes: 0ad8b480d6ee9 ("vhost: fix ref cnt checking deadlock")
Reported-by: Andrey Ryabinin &lt;arbn@yandex-team.com&gt;
Suggested-by: Hillf Danton &lt;hdanton@sina.com&gt;
Signed-off-by: Nikolay Kuratov &lt;kniv@yandex-team.ru&gt;
Message-Id: &lt;20250805130917.727332-1-kniv@yandex-team.ru&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>vhost: initialize vq-&gt;nheads properly</title>
<updated>2025-08-05T09:57:40Z</updated>
<author>
<name>Jason Wang</name>
<email>jasowang@redhat.com</email>
</author>
<published>2025-07-29T07:39:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=6a20f9fca30c4047488a616b5225acb82367ef6b'/>
<id>urn:sha1:6a20f9fca30c4047488a616b5225acb82367ef6b</id>
<content type='text'>
Commit 7918bb2d19c9 ("vhost: basic in order support") introduces
vq-&gt;nheads to store the number of batched used buffers per used elem
but it forgets to initialize the vq-&gt;nheads to NULL in
vhost_dev_init() this will cause kfree() that would try to free it
without be allocated if SET_OWNER is not called.

Reported-by: JAEHOON KIM &lt;jhkim@linux.ibm.com&gt;
Reported-by: Breno Leitao &lt;leitao@debian.org&gt;
Fixes: 45347e79b544 ("vhost: basic in order support")
Signed-off-by: Jason Wang &lt;jasowang@redhat.com&gt;
Message-Id: &lt;20250729073916.80647-1-jasowang@redhat.com&gt;
Reviewed-by: Dawid Osuchowski &lt;dawid.osuchowski@linux.intel.com&gt;
Tested-by: Breno Leitao &lt;leitao@debian.org&gt;
Reviewed-by: Stefano Garzarella &lt;sgarzare@redhat.com&gt;
Tested-by: Jaehoon Kim &lt;jhkim@linux.ibm.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost</title>
<updated>2025-08-01T21:17:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2025-08-01T21:17:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=821c9e515db512904250e1d460109a1dc4c7ef6b'/>
<id>urn:sha1:821c9e515db512904250e1d460109a1dc4c7ef6b</id>
<content type='text'>
Pull virtio updates from Michael Tsirkin:

 - vhost can now support legacy threading if enabled in Kconfig

 - vsock memory allocation strategies for large buffers have been
   improved, reducing pressure on kmalloc

 - vhost now supports the in-order feature. guest bits missed the merge
   window.

 - fixes, cleanups all over the place

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (30 commits)
  vsock/virtio: Allocate nonlinear SKBs for handling large transmit buffers
  vsock/virtio: Rename virtio_vsock_skb_rx_put()
  vhost/vsock: Allocate nonlinear SKBs for handling large receive buffers
  vsock/virtio: Move SKB allocation lower-bound check to callers
  vsock/virtio: Rename virtio_vsock_alloc_skb()
  vsock/virtio: Resize receive buffers so that each SKB fits in a 4K page
  vsock/virtio: Move length check to callers of virtio_vsock_skb_rx_put()
  vsock/virtio: Validate length in packet header before skb_put()
  vhost/vsock: Avoid allocating arbitrarily-sized SKBs
  vhost_net: basic in_order support
  vhost: basic in order support
  vhost: fail early when __vhost_add_used() fails
  vhost: Reintroduce kthread API and add mode selection
  vdpa: Fix IDR memory leak in VDUSE module exit
  vdpa/mlx5: Fix release of uninitialized resources on error path
  vhost-scsi: Fix check for inline_sg_cnt exceeding preallocated limit
  virtio: virtio_dma_buf: fix missing parameter documentation
  vhost: Fix typos
  vhost: vringh: Remove unused functions
  vhost: vringh: Remove unused iotlb functions
  ...
</content>
</entry>
</feed>
