[GIT PULL] virtio,vhost: last minute fixes

2025-09-25 Thread Michael S. Tsirkin
-0400) virtio,vhost: last minute fixes More small fixes. Most notably this fixes crashes and hangs in vhost-net. Signed-off-by: Michael S. Tsirkin Alok Tiwari (1): vhost-scsi: fix argument

[PATCH net] vhost: vringh: Fix copy_to_iter return value check

2025-09-24 Thread Michael S. Tsirkin
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. Cc: zhang jiao Link: https://lore.kernel.org/all/20250910091739.2999-1-zhangji...@cmss.chinamobile.com Signed-off-by: Michael S. Ts

Re: [PATCH net-next v5 0/8] TUN/TAP & vhost_net: netdev queue flow control to avoid ptr_ring tail drop

2025-09-24 Thread Michael S. Tsirkin
On Wed, Sep 24, 2025 at 04:30:45PM +0800, Jason Wang wrote: > On Wed, Sep 24, 2025 at 4:10 PM Michael S. Tsirkin wrote: > > > > On Wed, Sep 24, 2025 at 04:08:33PM +0800, Jason Wang wrote: > > > On Wed, Sep 24, 2025 at 3:42 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH net-next v5 0/8] TUN/TAP & vhost_net: netdev queue flow control to avoid ptr_ring tail drop

2025-09-24 Thread Michael S. Tsirkin
On Wed, Sep 24, 2025 at 04:08:33PM +0800, Jason Wang wrote: > On Wed, Sep 24, 2025 at 3:42 PM Michael S. Tsirkin wrote: > > > > On Wed, Sep 24, 2025 at 03:33:08PM +0800, Jason Wang wrote: > > > On Wed, Sep 24, 2025 at 3:18 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH net-next v5 0/8] TUN/TAP & vhost_net: netdev queue flow control to avoid ptr_ring tail drop

2025-09-24 Thread Michael S. Tsirkin
On Wed, Sep 24, 2025 at 03:33:08PM +0800, Jason Wang wrote: > On Wed, Sep 24, 2025 at 3:18 PM Michael S. Tsirkin wrote: > > > > On Tue, Sep 23, 2025 at 12:15:45AM +0200, Simon Schippers wrote: > > > This patch series deals with TUN, TAP and vhost_net which drop incoming &

Re: [PATCH V6 19/19] virtio_ring: add in order support

2025-09-23 Thread Michael S. Tsirkin
On Wed, Sep 24, 2025 at 01:38:03PM +0800, Jason Wang wrote: > On Mon, Sep 22, 2025 at 2:24 AM Michael S. Tsirkin wrote: > > > > On Fri, Sep 19, 2025 at 03:31:54PM +0800, Jason Wang wrote: > > > This patch implements in order support for both split virtqueue and > >

Re: [PATCH net-next v5 5/8] TUN & TAP: Provide ptr_ring_consume_batched wrappers for vhost_net

2025-09-23 Thread Michael S. Tsirkin
On Tue, Sep 23, 2025 at 12:15:50AM +0200, Simon Schippers wrote: > The wrappers tun_ring_consume_batched/tap_ring_consume_batched are similar > to the wrappers tun_ring_consume/tap_ring_consume. They deal with > consuming a batch of entries of the ptr_ring and then waking the > netdev queue wheneve

Re: [PATCH net-next v5 0/8] TUN/TAP & vhost_net: netdev queue flow control to avoid ptr_ring tail drop

2025-09-23 Thread Michael S. Tsirkin
On Tue, Sep 23, 2025 at 12:15:45AM +0200, Simon Schippers wrote: > This patch series deals with TUN, TAP and vhost_net which drop incoming > SKBs whenever their internal ptr_ring buffer is full. Instead, with this > patch series, the associated netdev queue is stopped before this happens. > This

Re: [PATCH net-next v5 4/8] TUN & TAP: Wake netdev queue after consuming an entry

2025-09-23 Thread Michael S. Tsirkin
On Tue, Sep 23, 2025 at 12:15:49AM +0200, Simon Schippers wrote: > The new wrappers tun_ring_consume/tap_ring_consume deal with consuming an > entry of the ptr_ring and then waking the netdev queue when entries got > invalidated to be used again by the producer. > To avoid waking the netdev queue w

Re: [PATCH v3 07/36] powerpc/vdso: Explicitly include asm/cputable.h and asm/feature-fixups.h

2025-09-21 Thread Michael Ellerman
Christophe Leroy writes: > Le 17/09/2025 à 16:00, Thomas Weißschuh a écrit : >> The usage of ASM_FTR_IFCLR(CPU_TR_ARCH_31) requires asm/cputable.h and >> asm/feature-fixups.h. Currently these headers are included transitively, >> but that transitive inclusion is about to go away. > > Hum ... > > T

Re: [PATCH V6 3/9] virtio: rename dma helpers

2025-09-21 Thread Michael S. Tsirkin
On Thu, Aug 21, 2025 at 02:46:35PM +0800, Jason Wang wrote: > Following patch will introduce virtio mapping function to avoid > abusing DMA API for device that doesn't do DMA. To ease the > introduction, this patch rename "dma" to "map" for the current dma > mapping helpers. > > Reviewed-by: Chris

Re: [PATCH V6 0/9] Refine virtio mapping API

2025-09-21 Thread Michael S. Tsirkin
On Thu, Aug 21, 2025 at 02:46:32PM +0800, Jason Wang wrote: > Hi all: > > Virtio used to be coupled with DMA API. This works fine for the device > that do real DMA but not the others. For example, VDUSE nees to craft > with DMA API in order to let the virtio-vdpa driver to work. > > This series t

Re: [PATCH V6 6/9] virtio: introduce map ops in virtio core

2025-09-21 Thread Michael S. Tsirkin
On Thu, Aug 21, 2025 at 02:46:38PM +0800, Jason Wang wrote: > This patch introduces map operations for virtio device. Virtio use to > use DMA API which is not necessarily the case since some devices used to use > doesn't do DMA. Instead of using tricks and abusing DMA API, let's > simply abstract

Re: [PATCH V6 8/9] vdpa: introduce map ops

2025-09-21 Thread Michael S. Tsirkin
On Thu, Aug 21, 2025 at 02:46:40PM +0800, Jason Wang wrote: > Virtio core allows the transport to provide device or transport > specific mapping functions. This patch adds this support to vDPA. We > can simply do this by allowing the vDPA parent to register a > virtio_map_ops. > > Reviewed-by: Chr

Re: [PATCH V6 6/9] virtio: introduce map ops in virtio core

2025-09-21 Thread Michael S. Tsirkin
On Thu, Aug 21, 2025 at 02:46:38PM +0800, Jason Wang wrote: > This patch introduces map operations for virtio device. Virtio use to > use DMA API which is not necessarily the case since some devices > doesn't do DMA. Instead of using tricks and abusing DMA API, let's > simply abstract the current m

Re: [PATCH V6 6/9] virtio: introduce map ops in virtio core

2025-09-21 Thread Michael S. Tsirkin
On Thu, Aug 21, 2025 at 02:46:38PM +0800, Jason Wang wrote: > This patch introduces map operations for virtio device. Virtio use to > use DMA API which is not necessarily the case since some devices > doesn't do DMA. Instead of using tricks and abusing DMA API, let's > simply abstract the current m

Re: [PATCH V6 8/9] vdpa: introduce map ops

2025-09-21 Thread Michael S. Tsirkin
On Thu, Aug 21, 2025 at 02:46:40PM +0800, Jason Wang wrote: > Virtio core allows the transport to provide device or transport > specific mapping functions. This patch adds this support to vDPA. We > can simply do this by allowing the vDPA parent to register a > virtio_map_ops. > > Reviewed-by: Chr

Re: [PATCH V5 1/9] virtio_ring: constify virtqueue pointer for DMA helpers

2025-09-21 Thread Michael S. Tsirkin
On Sun, Sep 21, 2025 at 04:55:10PM -0400, Michael S. Tsirkin wrote: > On Wed, Aug 13, 2025 at 01:48:23PM +0800, Jason Wang wrote: > > This patch consities virtqueue point for DMA helpers. > > constifies the virtqueue pointer note that i fixed it for now > > > > Rev

Re: [PATCH V5 5/9] virtio_ring: rename dma_handle to map_handle

2025-09-21 Thread Michael S. Tsirkin
On Sun, Sep 21, 2025 at 04:54:19PM -0400, Michael S. Tsirkin wrote: > On Wed, Aug 13, 2025 at 01:48:27PM +0800, Jason Wang wrote: > > Following patch will introduce virtio map opreations which means the > > operations note that i fixed it for now > > address is not nec

Re: [PATCH] vhost: vringh: Modify the return value check

2025-09-21 Thread Michael S. Tsirkin
On Sun, Sep 21, 2025 at 04:59:36PM -0400, Michael S. Tsirkin wrote: > On Wed, Sep 10, 2025 at 05:17:38PM +0800, zhangjiao2 wrote: > > From: zhang jiao > > > > The return value of copy_from_iter and copy_to_iter can't be negative, > > check whether the copied le

Re: [PATCH] vhost: Take a reference on the task that is reference in struct vhost_task.

2025-09-21 Thread Michael S. Tsirkin
On Sun, Sep 21, 2025 at 04:56:20PM -0400, Michael S. Tsirkin wrote: > Subject: that is reference -> that is referenced to note i fixed it for now. just dropped "that is referenced" completely. shorter. > On Thu, Sep 18, 2025 at 08:11:44PM +0200, Sebastian An

Re: [PATCH] vhost: vringh: Modify the return value check

2025-09-21 Thread Michael S. Tsirkin
On Wed, Sep 10, 2025 at 05:17:38PM +0800, zhangjiao2 wrote: > From: zhang jiao > > The return value of copy_from_iter and copy_to_iter can't be negative, > check whether the copied lengths are equal. > > Signed-off-by: zhang jiao Well I don't see a fix for copy_to_iter here.

Re: [PATCH] vhost: Take a reference on the task that is reference in struct vhost_task.

2025-09-21 Thread Michael S. Tsirkin
Subject: that is reference -> that is referenced On Thu, Sep 18, 2025 at 08:11:44PM +0200, Sebastian Andrzej Siewior wrote: > vhost_task_create() creates a task and keeps a reference to its > task_struct. That task may exit early via a signal and its task_struct > will be released. > A pending vho

Re: [PATCH V5 1/9] virtio_ring: constify virtqueue pointer for DMA helpers

2025-09-21 Thread Michael S. Tsirkin
On Wed, Aug 13, 2025 at 01:48:23PM +0800, Jason Wang wrote: > This patch consities virtqueue point for DMA helpers. constifies the virtqueue pointer > > Reviewed-by: Christoph Hellwig > Reviewed-by: Xuan Zhuo > Signed-off-by: Jason Wang > --- > drivers/virtio/virtio_ring.c | 25 +

Re: [PATCH V5 5/9] virtio_ring: rename dma_handle to map_handle

2025-09-21 Thread Michael S. Tsirkin
On Wed, Aug 13, 2025 at 01:48:27PM +0800, Jason Wang wrote: > Following patch will introduce virtio map opreations which means the operations > address is not necessarily used for DMA. Let's rename the dma_handle > to map_handle first. > > Reviewed-by: Christoph Hellwig > Reviewed-by: Xuan Zhuo

Re: [PATCH V6 14/19] virtio_ring: determine descriptor flags at one time

2025-09-21 Thread Michael S. Tsirkin
On Fri, Sep 19, 2025 at 03:31:49PM +0800, Jason Wang wrote: > Let's determine the last descriptor by counting the number of sg. This > would be consistent with packed virtqueue implementation and ease the > future in-order implementation. > > Acked-by: Eugenio Pérez > Reviewed-by: Xuan Zhuo > Si

Re: [PATCH V6 13/19] virtio_ring: introduce virtqueue ops

2025-09-21 Thread Michael S. Tsirkin
tion like in order. > > Note that in order to eliminate the indirect calls this patch uses > global array of const ops to allow compiler to avoid indirect > branches. > > Tested with CONFIG_MITIGATION_RETPOLINE, no performance differences > were noticed. > > Acked-by: E

Re: [PATCH V6 17/19] virtio_ring: factor out split indirect detaching logic

2025-09-21 Thread Michael S. Tsirkin
On Fri, Sep 19, 2025 at 03:31:52PM +0800, Jason Wang wrote: > Factor out the split indirect descriptor detaching logic in order to > make it be reused by the in order support. and I think you mean "allow it to be reused" > Acked-by: Eugenio Pérez > Reviewed-by: Xuan Zhuo > Signed-off-by: Jason

Re: [PATCH V6 17/19] virtio_ring: factor out split indirect detaching logic

2025-09-21 Thread Michael S. Tsirkin
On Fri, Sep 19, 2025 at 03:31:52PM +0800, Jason Wang wrote: > Factor out the split indirect descriptor detaching logic in order to > make it be reused by the in order support. > > Acked-by: Eugenio Pérez > Reviewed-by: Xuan Zhuo > Signed-off-by: Jason Wang > --- > drivers/virtio/virtio_ring.c

Re: [PATCH V6 19/19] virtio_ring: add in order support

2025-09-21 Thread Michael S. Tsirkin
+1.7% > RX: 10.6Mpps | 10.8Mpps| +1.8% > > Benchmark also shows no performance impact for in_order=off for queue > size with 256 and 1024. > > Signed-off-by: Jason Wang > Signed-off-by: Michael S. Tsirkin > --- > drivers/virtio/virtio_ring.c | 421

Re: [PATCH V6 19/19] virtio_ring: add in order support

2025-09-21 Thread Michael S. Tsirkin
Mpps | 5.70Mpps| +1.7% > RX: 10.6Mpps | 10.8Mpps| +1.8% > > Benchmark also shows no performance impact for in_order=off for queue > size with 256 and 1024. > > Signed-off-by: Jason Wang > Signed-off-by: Michael S. Tsirkin > --- > drivers/virtio/virt

Re: [PATCH V6 06/19] virtio_ring: switch to use vring_virtqueue for virtqueue_add variants

2025-09-21 Thread Michael S. Tsirkin
On Fri, Sep 19, 2025 at 03:31:41PM +0800, Jason Wang wrote: > Those variants are used internally so let's switch to use > vring_virtqueue as parameter to be consistent with other internal > virtqueue helpers. > > Acked-by: Eugenio Pérez > Reviewed-by: Xuan Zhuo > Signed-off-by: Jason Wang > ---

Re: [PATCH V6 07/19] virtio: switch to use vring_virtqueue for virtqueue_add variants

2025-09-21 Thread Michael S. Tsirkin
On Fri, Sep 19, 2025 at 03:31:42PM +0800, Jason Wang wrote: > Those variants are used internally so let's switch to use > vring_virtqueue as parameter to be consistent with other internal > virtqueue helpers. > > Acked-by: Eugenio Pérez > Reviewed-by: Xuan Zhuo > Signed-off-by: Jason Wang Thi

Re: [PATCH V6 14/19] virtio_ring: determine descriptor flags at one time

2025-09-21 Thread Michael S. Tsirkin
On Fri, Sep 19, 2025 at 03:31:49PM +0800, Jason Wang wrote: > Let's determine the last descriptor by counting the number of sg. This > would be consistent with packed virtqueue implementation and ease the > future in-order implementation. > > Acked-by: Eugenio Pérez > Reviewed-by: Xuan Zhuo > Si

Re: [PATCH V6 15/19] virtio_ring: factor out core logic of buffer detaching

2025-09-21 Thread Michael S. Tsirkin
On Fri, Sep 19, 2025 at 03:31:50PM +0800, Jason Wang wrote: > Factor out core logic of buffer detaching and leave the id population > to the caller so in order can just call the core logic. > > Acked-by: Eugenio Pérez > Reviewed-by: Xuan Zhuo > Signed-off-by: Jason Wang > --- > drivers/virtio/

Re: [PATCH V6 19/19] virtio_ring: add in order support

2025-09-21 Thread Michael S. Tsirkin
+1.7% > RX: 10.6Mpps | 10.8Mpps| +1.8% > > Benchmark also shows no performance impact for in_order=off for queue > size with 256 and 1024. > > Signed-off-by: Jason Wang > Signed-off-by: Michael S. Tsirkin > --- > drivers/virtio/virtio_ring.c | 421

Re: [PATCH v2 0/3] vhost_task: Fix a bug where KVM wakes an exited task

2025-09-18 Thread Michael S. Tsirkin
On Thu, Sep 18, 2025 at 09:52:19AM -0700, Sean Christopherson wrote: > On Thu, Sep 18, 2025, Michael S. Tsirkin wrote: > > On Thu, Sep 18, 2025 at 09:04:07AM -0700, Sean Christopherson wrote: > > > On Thu, Sep 18, 2025, Sebastian Andrzej Siewior wrote: > > > >

[GIT PULL] virtio,vhost: last minute fixes

2025-09-18 Thread Michael S. Tsirkin
compatibility sufficiently. Signed-off-by: Michael S. Tsirkin Alok Tiwari (1): vhost-scsi: fix argument order in tport allocation error message Alyssa Ross (1): virtio_config: clarify output parameters Ashwini Sahu (1

Re: [GIT PULL v2] virtio,vhost: last minute fixes

2025-09-18 Thread Michael S. Tsirkin
OK and now Filip asked me to drop this too. I am really batting 100x. Linus pls ignore all this. Very sorry. I judge rest of patches here aren't important enough for a pull, I will want for more patches to land and get tested. Thanks! On Thu, Sep 18, 2025 at 11:09:49AM -0400, Michael S. Ts

Re: [GIT PULL v2] virtio,vhost: last minute fixes

2025-09-18 Thread Michael S. Tsirkin
On Thu, Sep 18, 2025 at 05:45:05PM +0200, Filip Hejsek wrote: > On Thu, 2025-09-18 at 11:09 -0400, Michael S. Tsirkin wrote: > > Most notably this reverts a virtio console > > change since we made it without considering compatibility > > sufficiently. > > It seems t

Re: [PATCH v2 0/3] vhost_task: Fix a bug where KVM wakes an exited task

2025-09-18 Thread Michael S. Tsirkin
On Thu, Sep 18, 2025 at 09:04:07AM -0700, Sean Christopherson wrote: > On Thu, Sep 18, 2025, Sebastian Andrzej Siewior wrote: > > On 2025-09-18 11:09:05 [-0400], Michael S. Tsirkin wrote: > > > So how about switching to this approach then? > > > Instead of piling up f

Re: [PATCH v2 0/3] vhost_task: Fix a bug where KVM wakes an exited task

2025-09-18 Thread Michael S. Tsirkin
On Thu, Sep 18, 2025 at 05:48:26PM +0200, Sebastian Andrzej Siewior wrote: > On 2025-09-18 11:09:05 [-0400], Michael S. Tsirkin wrote: > > So how about switching to this approach then? > > Instead of piling up fixes like we seem to do now ... > > Sean? > > Since I am

[GIT PULL v2] virtio,vhost: last minute fixes

2025-09-18 Thread Michael S. Tsirkin
this reverts a virtio console change since we made it without considering compatibility sufficiently. Signed-off-by: Michael S. Tsirkin Alok Tiwari (1): vhost-scsi: fix argument order in tport allocation error message Alyssa Ro

Re: [PATCH v2 0/3] vhost_task: Fix a bug where KVM wakes an exited task

2025-09-18 Thread Michael S. Tsirkin
On Wed, Aug 27, 2025 at 10:10:59PM +0200, Sebastian Andrzej Siewior wrote: > On 2025-08-27 12:41:04 [-0700], Sean Christopherson wrote: > > Michael, > > Sean, > > would the bellow work by chance? It is a quick shot but it looks > symmetrical… > > diff --git

Re: [PATCH vhost 1/3] vhost-net: unbreak busy polling

2025-09-18 Thread Michael S. Tsirkin
ets 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 > Cc: sta...@vger.kernel.org &g

Re: [GIT PULL] virtio,vhost: last minute fixes

2025-09-18 Thread Michael S. Tsirkin
On Thu, Sep 18, 2025 at 10:41:44AM -0400, Michael S. Tsirkin wrote: > The following changes since commit 76eeb9b8de9880ca38696b2fb56ac45ac0a25c6c: > > Linux 6.17-rc5 (2025-09-07 14:22:57 -0700) > > are available in the Git repository at: > > https://git.kernel.org/pub

Re: [PATCH v2 0/3] vhost_task: Fix a bug where KVM wakes an exited task

2025-09-16 Thread Michael S. Tsirkin
On Mon, Sep 15, 2025 at 02:03:00PM -0700, Sean Christopherson wrote: > On Wed, Aug 27, 2025, Sean Christopherson wrote: > > Michael, > > > > Do you want to take this through the vhost tree? It technically fixes a KVM > > bug, but this obviously touches far more vhost

Re: [PATCH net 2/2] vhost-net: correctly flush batched packet before enabling notification

2025-09-16 Thread Michael S. Tsirkin
On Tue, Sep 16, 2025 at 03:20:36PM +0800, Jason Wang wrote: > On Tue, Sep 16, 2025 at 3:08 PM Michael S. Tsirkin wrote: > > > > On Tue, Sep 16, 2025 at 02:24:22PM +0800, Jason Wang wrote: > > > On Tue, Sep 16, 2025 at 1:19 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH net 2/2] vhost-net: correctly flush batched packet before enabling notification

2025-09-16 Thread Michael S. Tsirkin
On Tue, Sep 16, 2025 at 02:24:22PM +0800, Jason Wang wrote: > On Tue, Sep 16, 2025 at 1:19 PM Michael S. Tsirkin wrote: > > > > On Tue, Sep 16, 2025 at 10:37:35AM +0800, Jason Wang wrote: > > > On Tue, Sep 16, 2025 at 12:03 AM Michael S. Tsirkin > > > wrote: >

Re: [PATCH net 2/2] vhost-net: correctly flush batched packet before enabling notification

2025-09-15 Thread Michael S. Tsirkin
On Tue, Sep 16, 2025 at 10:37:35AM +0800, Jason Wang wrote: > On Tue, Sep 16, 2025 at 12:03 AM Michael S. Tsirkin wrote: > > > > On Fri, Sep 12, 2025 at 04:26:58PM +0800, Jason Wang wrote: > > > Commit 8c2e6b26ffe2 ("vhost/net: Defer TX queue re-enable until after &

Re: [PATCH net V2 2/2] vhost-net: correctly flush batched packet before enabling notification

2025-09-15 Thread Michael S. Tsirkin
On Mon, Sep 15, 2025 at 10:47:03AM +0800, Jason Wang wrote: > 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 will bring si

Re: [PATCH 0/6] Add multiple address spaces support to VDUSE

2025-09-15 Thread Michael S. Tsirkin
On Tue, Aug 26, 2025 at 01:27:03PM +0200, Eugenio Pérez wrote: > When used by vhost-vDPA bus driver for VM, the control virtqueue > should be shadowed via userspace VMM (QEMU) instead of being assigned > directly to Guest. This is because QEMU needs to know the device state > in order to start and

Re: [PATCH v2 0/3] vhost_task: Fix a bug where KVM wakes an exited task

2025-09-15 Thread Michael S. Tsirkin
On Wed, Aug 27, 2025 at 05:16:35PM -0700, Sean Christopherson wrote: > On Wed, Aug 27, 2025, Sebastian Andrzej Siewior wrote: > > On 2025-08-27 12:41:04 [-0700], Sean Christopherson wrote: > > > Michael, > > > > Sean, > > > > would the bellow work

[PATCH v3 1/3] vhost-net: unbreak busy polling

2025-09-15 Thread Michael S. Tsirkin
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 Cc: sta...@vger.kernel.org Fixes: 67a873df0c41 ("vhost: basic in order support") Signed-off-by: Ja

[PATCH v3 2/3] Revert "vhost/net: Defer TX queue re-enable until after sendmsg"

2025-09-15 Thread Michael S. Tsirkin
6b26ffe2 ("vhost/net: Defer TX queue re-enable until after sendmsg") Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 30 +- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/

[PATCH v3 3/3] vhost-net: flush batched before enabling notifications

2025-09-15 Thread Michael S. Tsirkin
2e6b26ffe2 ("vhost/net: Defer TX queue re-enable until after sendmsg") Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.

Re: [PATCH net 2/2] vhost-net: correctly flush batched packet before enabling notification

2025-09-15 Thread Michael S. Tsirkin
On Fri, Sep 12, 2025 at 04:26:58PM +0800, Jason Wang wrote: > 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 will bring si

Re: [PATCH] Revert "virtio_console: fix order of fields cols and rows"

2025-09-15 Thread Michael S. Tsirkin
On Fri, Sep 12, 2025 at 04:06:37PM +0200, Filip Hejsek wrote: > On Fri, 2025-09-12 at 04:56 -0400, Michael S. Tsirkin wrote: > > when a previous version of this > > patch series was being discussed here on this mailing list in 2020, it > > was decided that QEMU s

Re: [PATCH net 2/2] vhost-net: correctly flush batched packet before enabling notification

2025-09-12 Thread Michael S. Tsirkin
On Fri, Sep 12, 2025 at 03:33:32PM +, Jon Kohler wrote: > > > > On Sep 12, 2025, at 11:30 AM, Michael S. Tsirkin wrote: > > > > !---| >

Re: [PATCH net 2/2] vhost-net: correctly flush batched packet before enabling notification

2025-09-12 Thread Michael S. Tsirkin
On Fri, Sep 12, 2025 at 03:24:42PM +, Jon Kohler wrote: > > > > On Sep 12, 2025, at 4:50 AM, Michael S. Tsirkin wrote: > > > > !---| >

[PATCH] Revert "virtio_console: fix order of fields cols and rows"

2025-09-12 Thread Michael S. Tsirkin
rompt. It seems better to just drop the change (it was only in 2 releases so far), going back to the status quo. Reported-by: Filip Hejsek Fixes: 5326ab737a47 ("virtio_console: fix order of fields cols and rows") Cc: "Maximilian Immanuel Brandtner" Signed-off-by: Michael S. T

Re: [PATCH net 1/2] vhost-net: unbreak busy polling

2025-09-12 Thread Michael S. Tsirkin
;vhost: basic in order support") > Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin > --- > drivers/vhost/net.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index c6508fe0d5c8..1

Re: [PATCH net 2/2] vhost-net: correctly flush batched packet before enabling notification

2025-09-12 Thread Michael S. Tsirkin
On Fri, Sep 12, 2025 at 04:26:58PM +0800, Jason Wang wrote: > 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 will bring si

[PATCH] Revert "virtio_console: fix order of fields cols and rows"

2025-09-12 Thread Michael S. Tsirkin
rompt. NB: the command structures really should move to the UAPI header so it is easier to notice when a change is breaking the guest/host ABI. Reported-by: Filip Hejsek Fixes: 5326ab737a47 ("virtio_console: fix order of fields cols and rows") Cc: "Maximilian Immanuel Brandtner"

Re: vhost_iotlb_miss tight loop lockup - RE vhost/net: Defer TX queue re-enable until after sendmsg

2025-09-10 Thread Michael S. Tsirkin
On Thu, Sep 11, 2025 at 01:49:05PM +0800, Jason Wang wrote: > On Thu, Sep 11, 2025 at 4:11 AM Michael S. Tsirkin wrote: > > > > On Wed, Sep 10, 2025 at 06:58:18PM +, Jon Kohler wrote: > > > > > > > > > > On May 5, 2025, at 9:40

Re: vhost_iotlb_miss tight loop lockup - RE vhost/net: Defer TX queue re-enable until after sendmsg

2025-09-10 Thread Michael S. Tsirkin
On Wed, Sep 10, 2025 at 06:58:18PM +, Jon Kohler wrote: > > > > On May 5, 2025, at 9:40 PM, patchwork-bot+netdev...@kernel.org wrote: > > > > Hello: > > > > This patch was applied to netdev/net-next.git (main) > > by Jakub Kicinski : > > Hey all, > Writing to fire up a flare and point out

Re: [PATCH 2/4] netdev queue flow control for TUN

2025-09-03 Thread Michael S. Tsirkin
On Tue, Sep 02, 2025 at 10:09:55AM +0200, Simon Schippers wrote: > The netdev queue is stopped in tun_net_xmit after inserting an SKB into > the ring buffer if the ring buffer became full because of that. If the > insertion into the ptr_ring fails, the netdev queue is also stopped and > the SKB is

Re: [PATCH 2/4] netdev queue flow control for TUN

2025-09-03 Thread Michael S. Tsirkin
is cuteness of looking at the consumer is actually not necessary, and bad for cache. You just want this: Signed-off-by: Michael S. Tsirkin diff --git a/include/linux/ptr_ring.h b/include/linux/ptr_ring.h index 551329220e4f..de25fe81dd4e 100644 --- a/include/linux/ptr_ring.h +++ b/include/

Re: [PATCH 1/4] ptr_ring_spare: Helper to check if spare capacity of size cnt is available

2025-09-03 Thread Michael S. Tsirkin
On Tue, Sep 02, 2025 at 10:09:54AM +0200, Simon Schippers wrote: > The implementation is inspired by ptr_ring_empty. > > Co-developed-by: Tim Gebauer > Signed-off-by: Tim Gebauer > Signed-off-by: Simon Schippers > --- > include/linux/ptr_ring.h | 71 >

[GIT PULL] virtio,vhost: fixes

2025-08-27 Thread Michael S. Tsirkin
in shmem affecting drm users. Signed-off-by: Michael S. Tsirkin Igor Torrente (1): Revert "virtio: reject shm region if length is zero" Junnan Wu (1): virtio_net: adjust the execution order of function `vir

Re: [PATCH 1/3] vhost_task: KVM: Don't wake KVM x86's recovery thread if vhost task was killed

2025-08-26 Thread Michael S. Tsirkin
On Tue, Aug 26, 2025 at 07:03:33AM -0700, Sean Christopherson wrote: > On Tue, Aug 26, 2025, Michael S. Tsirkin wrote: > > On Mon, Aug 25, 2025 at 05:40:09PM -0700, Sean Christopherson wrote: > > > Provide an API in vhost task instead of forcing KVM to solve the problem,

Re: [PATCH 1/3] vhost_task: KVM: Don't wake KVM x86's recovery thread if vhost task was killed

2025-08-26 Thread Michael S. Tsirkin
On Tue, Aug 26, 2025 at 07:03:33AM -0700, Sean Christopherson wrote: > On Tue, Aug 26, 2025, Michael S. Tsirkin wrote: > > On Mon, Aug 25, 2025 at 05:40:09PM -0700, Sean Christopherson wrote: > > > Provide an API in vhost task instead of forcing KVM to solve the problem,

Re: [PATCH 1/3] vhost_task: KVM: Don't wake KVM x86's recovery thread if vhost task was killed

2025-08-26 Thread Michael S. Tsirkin
On Mon, Aug 25, 2025 at 05:40:09PM -0700, Sean Christopherson wrote: > Add a vhost_task_wake_safe() variant to handle the case where a vhost task > has exited due to a signal, i.e. before being explicitly stopped by the > owner of the task, and use the "safe" API in KVM when waking NX hugepage > re

Re: [PATCH 11/11] tools headers: Sync uapi/linux/vhost.h with the kernel source

2025-08-26 Thread Michael S. Tsirkin
erf 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" > Cc: J

Re: [PATCH] rseq/selftests: Use weak symbol reference, not definition, to link with glibc

2025-08-20 Thread Michael Jeanson
On 2025-08-20 08:55, Mathieu Desnoyers wrote: Michael, can you try it out ? Tested on Debian 13 amd64 (Glibc 2.41 and GCC 14.2.0), no segfaults, all the rseq tests pass.

Re: [PATCH] rseq/selftests: Use weak symbol reference, not definition, to link with glibc

2025-08-20 Thread Michael Jeanson
On 2025-08-20 08:55, Mathieu Desnoyers wrote: Michael, can you try it out ? Will do. Kienan, we may want to add a configuration forcing "-fno-common" to our CI, this problematic pattern may be hiding other issues elsewhere. I'm thinking of LTTng-UST tracepoint headers and

Re: [PATCH] vhost: Fix ioctl # for VHOST_[GS]ET_FORK_FROM_OWNER

2025-08-19 Thread Michael S. Tsirkin
On Mon, Aug 18, 2025 at 11:39:57PM -0700, Namhyung Kim wrote: > 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/tr

Re: [PATCH 0/2] Fix vsock error-handling regression introduced in v6.17-rc1

2025-08-19 Thread Michael S. Tsirkin
1] https://lore.kernel.org/all/689a3d92.050a0220.7f033.00ff@google.com/ Acked-by: Michael S. Tsirkin > Cc: Alexander Viro > Cc: Christian Brauner > Cc: "David S. Miller" > Cc: Eric Dumazet > Cc: Hillf Danton > Cc: Jakub Kicinski > Cc: Jason Wang > Cc: "Michael

Re: [PATCH V5 4/9] virtio: introduce vring_mapping_token

2025-08-18 Thread Michael S. Tsirkin
On Mon, Aug 18, 2025 at 11:09:44AM +0200, Eugenio Perez Martin wrote: > On Thu, Aug 14, 2025 at 12:42 PM Michael S. Tsirkin wrote: > > > > On Thu, Aug 14, 2025 at 11:36:22AM +0800, Jason Wang wrote: > > > > > diff --git a/include/linux/virtio.h b/include/

Re: [REGRESSION] virtio: reject shm region if length is zero

2025-08-16 Thread Michael S. Tsirkin
On Sat, Aug 16, 2025 at 01:05:21PM +0200, Alyssa Ross wrote: > "Michael S. Tsirkin" writes: > > > On Fri, Aug 15, 2025 at 09:19:34PM +0200, Alyssa Ross wrote: > >> Alyssa Ross writes: > >> > >> > On Mon, May 12, 2025 at 07:51:53A

Re: [PATCH v4 9/9] vsock/virtio: Allocate nonlinear SKBs for handling large transmit buffers

2025-08-16 Thread Michael S. Tsirkin
On Fri, Aug 15, 2025 at 08:07:46PM +0800, Hillf Danton wrote: > On Fri, 15 Aug 2025 06:22:56 -0400 "Michael S. Tsirkin" wrote: > > On Wed, Aug 13, 2025 at 09:25:53PM +0800, Hillf Danton wrote: > > > On Wed, 13 Aug 2025 04:41:09 -0400 "Michael S. Tsirkin" wro

Re: [REGRESSION] virtio: reject shm region if length is zero

2025-08-16 Thread Michael S. Tsirkin
On Fri, Aug 15, 2025 at 09:19:34PM +0200, Alyssa Ross wrote: > Alyssa Ross writes: > > > On Mon, May 12, 2025 at 07:51:53AM +0930, samiuddinsami.md...@gmail.com > > wrote: > >> From: Sami Uddin > >> > >> Prevent usage of shared memory regions where the length is zero, > >> as such configuration

Re: [syzbot] [kvm?] [net?] [virt?] WARNING in virtio_transport_send_pkt_info

2025-08-16 Thread Michael S. Tsirkin
On Fri, Aug 15, 2025 at 04:48:00PM +0100, Will Deacon wrote: > On Fri, Aug 15, 2025 at 01:00:59PM +0100, Will Deacon wrote: > > On Fri, Aug 15, 2025 at 06:44:47AM -0400, Michael S. Tsirkin wrote: > > > On Fri, Aug 15, 2025 at 11:09:24AM +0100, Will Deacon wrote: > > > &

Re: [syzbot] [kvm?] [net?] [virt?] WARNING in virtio_transport_send_pkt_info

2025-08-15 Thread Michael S. Tsirkin
On Fri, Aug 15, 2025 at 11:09:24AM +0100, Will Deacon wrote: > On Tue, Aug 12, 2025 at 06:15:46AM -0400, Michael S. Tsirkin wrote: > > On Tue, Aug 12, 2025 at 03:03:02AM -0700, syzbot wrote: > > > Hello, > > > > > > syzbot has tested the propos

Re: [PATCH v4 9/9] vsock/virtio: Allocate nonlinear SKBs for handling large transmit buffers

2025-08-15 Thread Michael S. Tsirkin
On Wed, Aug 13, 2025 at 09:25:53PM +0800, Hillf Danton wrote: > On Wed, 13 Aug 2025 04:41:09 -0400 "Michael S. Tsirkin" wrote: > > On Thu, Jul 17, 2025 at 10:01:16AM +0100, Will Deacon wrote: > > > When transmitting a vsock packet, virtio_tra

Re: [PATCH V5 4/9] virtio: introduce vring_mapping_token

2025-08-15 Thread Michael S. Tsirkin
On Fri, Aug 15, 2025 at 09:02:09AM +0800, Jason Wang wrote: > On Thu, Aug 14, 2025 at 6:42 PM Michael S. Tsirkin wrote: > > > > On Thu, Aug 14, 2025 at 11:36:22AM +0800, Jason Wang wrote: > > > > > diff --git a/include/linux/virtio.h b/include/linux/virtio.

Re: [PATCH V5 4/9] virtio: introduce vring_mapping_token

2025-08-14 Thread Michael S. Tsirkin
On Thu, Aug 14, 2025 at 11:36:22AM +0800, Jason Wang wrote: > > > diff --git a/include/linux/virtio.h b/include/linux/virtio.h > > > index addbc209275a..37029df94aaf 100644 > > > --- a/include/linux/virtio.h > > > +++ b/include/linux/virtio.h > > > @@ -40,6 +40,13 @@ struct virtqueue { > > >

Re: [PATCH V5 4/9] virtio: introduce vring_mapping_token

2025-08-13 Thread Michael S. Tsirkin
On Wed, Aug 13, 2025 at 01:48:26PM +0800, Jason Wang wrote: > Following patch will introduce the mapping operations for virtio > device. In order to achieve this, besides the dma device, virtio core > needs to support a transport or device specific mapping token as well. > So this patch introduces

Re: [PATCH V5 4/9] virtio: introduce vring_mapping_token

2025-08-13 Thread Michael S. Tsirkin
On Wed, Aug 13, 2025 at 01:48:26PM +0800, Jason Wang wrote: > Following patch will introduce the mapping operations for virtio > device. In order to achieve this, besides the dma device, virtio core > needs to support a transport or device specific mapping token as well. > So this patch introduces

Re: [PATCH v4 9/9] vsock/virtio: Allocate nonlinear SKBs for handling large transmit buffers

2025-08-13 Thread Michael S. Tsirkin
On Thu, Jul 17, 2025 at 10:01:16AM +0100, Will Deacon wrote: > When transmitting a vsock packet, virtio_transport_send_pkt_info() calls > virtio_transport_alloc_linear_skb() to allocate and fill SKBs with the > transmit data. Unfortunately, these are always linear allocations and > can therefore re

Re: [syzbot] [kvm?] [net?] [virt?] WARNING in virtio_transport_send_pkt_info

2025-08-12 Thread Michael S. Tsirkin
On Tue, Aug 12, 2025 at 03:03:02AM -0700, syzbot wrote: > Hello, > > syzbot has tested the proposed patch but the reproducer is still triggering > an issue: > WARNING in virtio_transport_send_pkt_info OK so the issue triggers on commit 6693731487a8145a9b039bc983d77edc47693855 Author: Will Deacon

Re: [syzbot] [kvm?] [net?] [virt?] WARNING in virtio_transport_send_pkt_info

2025-08-12 Thread Michael S. Tsirkin
On Mon, Aug 11, 2025 at 11:59:30AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:37816488247d Merge tag 'net-6.17-rc1' of git://git.kernel... > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=10b3b2f058 > kernel

Re: [syzbot] [kvm?] [net?] [virt?] WARNING in virtio_transport_send_pkt_info

2025-08-12 Thread Michael S. Tsirkin
On Mon, Aug 11, 2025 at 11:59:30AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:37816488247d Merge tag 'net-6.17-rc1' of git://git.kernel... > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=10b3b2f058 > kernel

Re: [PATCH v2] Revert "virtio: reject shm region if length is zero"

2025-08-08 Thread Michael S. Tsirkin
to be adjacent to Signed-off-by. But anyway, I already included v1 in my tree, pls check it out and tell me if more fixes are needed. > --- > v2: Improve the commit message (Michael S. Tsirkin) > > include/linux/virtio_config.h | 2 -- > 1 file changed, 2 deletions(-) >

[GIT PULL] vhost: bugfix

2025-08-07 Thread Michael S. Tsirkin
host. Signed-off-by: Michael S. Tsirkin Jason Wang (1): vhost: initialize vq->nheads properly drivers/vhost/vhost.c | 1 + 1 file changed, 1 insertion(+)

Re: [PATCH] Revert "virtio: reject shm region if length is zero"

2025-08-07 Thread Michael S. Tsirkin
On Thu, Aug 07, 2025 at 09:41:45AM -0300, Igor Torrente wrote: > This reverts commit 206cc44588f72b49ad4d7e21a7472ab2a72a83df. > No that's not enough. Explain the why not the what. for example --- The commit 206cc44588f7 ("virtio: reject shm region if length is zero") breaks the Virtio-gpu

Re: `virtio: reject shm region if length is zero` breaks virtio-gpu host_visible feature

2025-08-06 Thread Michael S. Tsirkin
On Wed, Aug 06, 2025 at 03:34:55PM -0300, Igor Torrente wrote: > Hello, > > The commit `206cc44588f7 virtio: reject shm region if length is zero` breaks > the Virtio-gpu `host_visible` feature. > > As you can see in the snippet below, host_visible_region is zero because of > the `kzalloc`. > I

Re: [PATCH v2] vhost/net: Replace wait_queue with completion in ubufs reference

2025-08-05 Thread Michael S. Tsirkin
On Fri, Jul 18, 2025 at 02:03:55PM +0300, Nikolay Kuratov wrote: > 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 > //

Re: [PATCH] vhost: initialize vq->nheads properly

2025-08-04 Thread Michael S. Tsirkin
On Mon, Aug 04, 2025 at 05:05:57PM +0800, Jason Wang wrote: > Hi Michael: > > On Tue, Jul 29, 2025 at 3:39 PM Jason Wang wrote: > > > > Commit 7918bb2d19c9 ("vhost: basic in order support") introduces > > vq->nheads to store the number of batched used buf

Re: [GIT PULL] virtio, vhost: features, fixes

2025-08-01 Thread Michael S. Tsirkin
On Fri, Aug 01, 2025 at 09:03:35AM -0400, Michael S. Tsirkin wrote: > On Fri, Aug 01, 2025 at 07:00:32AM -0400, Michael S. Tsirkin wrote: > > The following changes since commit 347e9f5043c89695b01e66b3ed111755afcf1911: > > > > Linux 6.16-rc6 (2025-07-13 14:25:58 -0700) >

  1   2   3   4   5   6   7   8   9   10   >