Re: [PATCH net-next v3] vhost/net: Defer TX queue re-enable until after sendmsg

2025-05-01 Thread Michael S. Tsirkin
n) > Datagrams/second: ~650k (~1.7x increase) > Interval Transfer Bitrate Lost/Total Datagrams > 0.00-30.00 sec 26.4 GBytes 7.55 Gbits/sec 0/19554720 (0%) sender > > Acked-by: Jason Wang > Signed-off-by: Jon Kohler Acked-by: Mic

Re: [PATCH v9 4/4] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-04-30 Thread Michael S. Tsirkin
On Wed, Apr 30, 2025 at 11:34:49AM +0800, Jason Wang wrote: > On Tue, Apr 29, 2025 at 6:56 PM Michael S. Tsirkin wrote: > > > > On Tue, Apr 29, 2025 at 11:39:37AM +0800, Jason Wang wrote: > > > On Mon, Apr 21, 2025 at 11:46 AM Jason Wang wrote: > > > > >

Re: [PATCH v9 4/4] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-04-29 Thread Michael S. Tsirkin
mpt to use it will result in failure. > > > > > > I think we need to describe why the default value was chosen to be false. > > > > > > What's more, should we document the implications here? > > > > > > inherit_owner was set to false: this mean

Re: [PATCH v6 0/4] virtio-net: disable delayed refill when pausing rx

2025-04-25 Thread Michael S. Tsirkin
6067319.git-patchwork-not...@kernel.org/T/ Acked-by: Michael S. Tsirkin > Version 6 changes: > - Rebase on net-next and resolve conflicts > - Move the retry logic to xdp_helper > > Version 5 changes: > - Refactor the selftest > > Version 4 changes: > - Add force zerocopy

Re: [PATCH net-next v2] vhost/net: Defer TX queue re-enable until after sendmsg

2025-04-24 Thread Michael S. Tsirkin
On Thu, Apr 24, 2025 at 01:53:34PM +, Jon Kohler wrote: > > > > On Apr 24, 2025, at 8:11 AM, Michael S. Tsirkin wrote: > > > > !---| >

Re: [PATCH net-next v2] vhost/net: Defer TX queue re-enable until after sendmsg

2025-04-24 Thread Michael S. Tsirkin
requeue handler if > > +* necessary. If there is no work, queue will be reenabled. > > +*/ > > + vhost_net_busy_poll_try_queue(net, vq); > > This will call vhost_poll_queue() regardless of the 'busyloop_intr' flag > value, while AFAICS prior to this p

Re: [PATCH v5 0/3] virtio-net: disable delayed refill when pausing rx

2025-04-24 Thread Michael S. Tsirkin
6067319.git-patchwork-not...@kernel.org/T/ Acked-by: Michael S. Tsirkin > Version 5 changes: > - Refactor the selftest > > Version 4 changes: > - Add force zerocopy mode to xdp_helper > - Make virtio_net selftest use force zerocopy mode > - Move virtio_net selftest to drivers/

[GIT PULL] virtio, vhost: fixes

2025-04-22 Thread Michael S. Tsirkin
spec compliance fixes in: virtio-pci cap commands vhost_scsi_send_bad_target virtio console resize missing locking fix in vhost-scsi virtio ring - a KCSAN false positive fix VHOST_*_OWNER documentation fix Signed-off-by: Michael S. Tsirkin

Re: [PATCH v9 2/4] vhost: Reintroduce kthread mode support in vhost

2025-04-21 Thread Michael S. Tsirkin
On Mon, Apr 21, 2025 at 11:39:14AM +0800, Jason Wang wrote: > On Mon, Apr 21, 2025 at 10:45 AM Cindy Lu wrote: > > > > This patch reintroduces kthread mode support in vhost, > > It also introduces struct vhost_worker_ops to abstract > > worker create/stop/wakeup operations. > > > > * Bring back th

Re: [PATCH v9 2/4] vhost: Reintroduce kthread mode support in vhost

2025-04-21 Thread Michael S. Tsirkin
On Mon, Apr 21, 2025 at 10:44:08AM +0800, Cindy Lu wrote: > This patch reintroduces kthread mode support in vhost, > It also introduces struct vhost_worker_ops to abstract > worker create/stop/wakeup operations. > > * Bring back the original vhost_worker() implementation, > and renamed to vhost_

Re: [PATCH net-next v2] vhost/net: Defer TX queue re-enable until after sendmsg

2025-04-20 Thread Michael S. Tsirkin
n) > Datagrams/second: ~650k (~1.7x increase) > Interval Transfer Bitrate Lost/Total Datagrams > 0.00-30.00 sec 26.4 GBytes 7.55 Gbits/sec 0/19554720 (0%) sender > > Acked-by: Jason Wang > Signed-off-by: Jon Kohler sounds like

Re: [PATCH v3 9/9] vhost: add WARNING if log_num is more than limit

2025-04-15 Thread Michael S. Tsirkin
On Mon, Apr 14, 2025 at 09:52:04AM -0700, Dongli Zhang wrote: > Hi Michael, > > On 4/14/25 9:32 AM, Michael S. Tsirkin wrote: > > On Wed, Apr 02, 2025 at 11:29:54PM -0700, Dongli Zhang wrote: > >> Since long time ago, the only user of vq->log is vhost-net. The concern

Re: [PATCH v3 0/3] virtio-net: disable delayed refill when pausing rx

2025-04-15 Thread Michael S. Tsirkin
) to pause the rx. > > Version 3 changes: > - Patch 1: refactor to avoid code duplication > > Version 2 changes: > - Add selftest for deadlock scenario > > Thanks, > Quang Minh. Acked-by: Michael S. Tsirkin > Bui Quang Minh (3): > virtio-net: disable delayed

Re: [PATCH v3 1/3] virtio-net: disable delayed refill when pausing rx

2025-04-15 Thread Michael S. Tsirkin
pers and fixes up the > virtnet_rx_resume to disable future and cancel all inflights delayed > refill_work before calling napi_disable() to pause the rx. > > Fixes: 413f0271f396 ("net: protect NAPI enablement with netdev_lock()") > Signed-off-by: Bui Quang

Re: [PATCH v3 9/9] vhost: add WARNING if log_num is more than limit

2025-04-14 Thread Michael S. Tsirkin
On Wed, Apr 02, 2025 at 11:29:54PM -0700, Dongli Zhang wrote: > Since long time ago, the only user of vq->log is vhost-net. The concern is > to add support for more devices (i.e. vhost-scsi or vsock) may reveals > unknown issue in the vhost API. Add a WARNING. > > Suggested-by: Joao Martins > Sig

Re: [PATCH v2 1/3] virtio-net: disable delayed refill when pausing rx

2025-04-14 Thread Michael S. Tsirkin
On Mon, Apr 14, 2025 at 12:08:35PM +0700, Bui Quang Minh wrote: > When pausing rx (e.g. set up xdp, xsk pool, rx resize), we call > napi_disable() on the receive queue's napi. In delayed refill_work, it > also calls napi_disable() on the receive queue's napi. When > napi_disable() is called on an

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

2025-04-10 Thread Michael S. Tsirkin
On Tue, Apr 08, 2025 at 03:02:35PM +0800, Jason Wang wrote: > On Mon, Apr 7, 2025 at 4:20 PM Michael S. Tsirkin wrote: > > > > On Mon, Mar 24, 2025 at 02:01:21PM +0800, Jason Wang wrote: > > > This patch introduces virtqueue ops which is a set of the callbacks >

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-10 Thread Michael S. Tsirkin
Wow great job digging through all these hypervisors! On Mon, Apr 07, 2025 at 10:38:59AM +0200, David Hildenbrand wrote: > crossvm: > https://github.com/google/crosvm/blob/main/devices/src/virtio/balloon.rs > > -> Hard-codes queue numbers; does *not* offer/implement >VIRTIO_BALLOON_F_STATS_VQ

Re: [PATCH] virtio-net: hold netdev_lock when pausing rx

2025-04-10 Thread Michael S. Tsirkin
On Thu, Apr 10, 2025 at 02:05:57PM +0700, Bui Quang Minh wrote: > When pausing rx (e.g. set up xdp, xsk pool, rx resize), we call > napi_disable() on the receive queue's napi. In delayed refill_work, it > also calls napi_disable() on the receive queue's napi. When > napi_disable() is called on an a

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-09 Thread Michael S. Tsirkin
On Wed, Apr 09, 2025 at 02:24:32PM +0200, David Hildenbrand wrote: > On 09.04.25 14:07, Michael S. Tsirkin wrote: > > On Wed, Apr 09, 2025 at 01:12:19PM +0200, David Hildenbrand wrote: > > > On 09.04.25 12:56, Michael S. Tsirkin wrote: > > > > On Wed, Apr 09, 2

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-09 Thread Michael S. Tsirkin
On Wed, Apr 09, 2025 at 01:12:19PM +0200, David Hildenbrand wrote: > On 09.04.25 12:56, Michael S. Tsirkin wrote: > > On Wed, Apr 09, 2025 at 12:46:41PM +0200, David Hildenbrand wrote: > > > On 07.04.25 23:20, Michael S. Tsirkin wrote: > > > > On Mon, Apr 07, 2

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-09 Thread Michael S. Tsirkin
On Wed, Apr 09, 2025 at 12:46:41PM +0200, David Hildenbrand wrote: > On 07.04.25 23:20, Michael S. Tsirkin wrote: > > On Mon, Apr 07, 2025 at 08:47:05PM +0200, David Hildenbrand wrote: > > > > In my opinion, it makes the most sense to keep the spec as it is and > > >

Re: [PATCH v8 8/8] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-04-08 Thread Michael S. Tsirkin
On Fri, Mar 28, 2025 at 06:02:52PM +0800, Cindy Lu wrote: > Introduce a new config knob `CONFIG_VHOST_ENABLE_FORK_OWNER_IOCTL`, > to control the availability of the `VHOST_FORK_FROM_OWNER` ioctl. > When CONFIG_VHOST_ENABLE_FORK_OWNER_IOCTL is set to n, the ioctl > is disabled, and any attempt to us

Re: [PATCH 0/7] irqbypass: Cleanups and a perf improvement

2025-04-08 Thread Michael S. Tsirkin
work. But > that's a future problem. > > [1] https://lore.kernel.org/all/20230801115646.33990-1-lik...@tencent.com > [2] https://lore.kernel.org/all/20250401161804.842968-1-sea...@google.com vdpa changes seem minor, so Acked-by: Michael S. Tsirkin > Sean Christopherson (7): >

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 08:47:05PM +0200, David Hildenbrand wrote: > > In my opinion, it makes the most sense to keep the spec as it is and > > change QEMU and the kernel to match, but obviously that's not trivial > > to do in a way that doesn't break existing devices and drivers. > > If only it w

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 03:28:13PM +0200, Cornelia Huck wrote: > On Mon, Apr 07 2025, David Hildenbrand wrote: > > > On 07.04.25 15:12, Halil Pasic wrote: > >> On Mon, 7 Apr 2025 04:34:29 -0400 > >> "Michael S. Tsirkin" wrote: > >> >

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 11:11:34AM +0200, David Hildenbrand wrote: > On 07.04.25 10:58, Michael S. Tsirkin wrote: > > On Mon, Apr 07, 2025 at 10:54:00AM +0200, David Hildenbrand wrote: > > > On 07.04.25 10:49, Michael S. Tsirkin wrote: > > > > On Mon, Apr 07, 2

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 10:54:00AM +0200, David Hildenbrand wrote: > On 07.04.25 10:49, Michael S. Tsirkin wrote: > > On Mon, Apr 07, 2025 at 10:44:21AM +0200, David Hildenbrand wrote: > > > > > > > > > > > > > > > > > Whoever

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 09:18:21AM +0200, David Hildenbrand wrote: > > Now I am beginning to think we should leave the spec alone > > and fix the drivers ... Ugh > > We could always say that starting with feature X, queue indexes are fixed > again. E.g., VIRTIO_BALLOON_F_X would have it's vir

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 10:44:21AM +0200, David Hildenbrand wrote: > > > > > > > > > Whoever adds new feat_X *must be aware* about all previous features, > > > otherwise we'd be reusing feature bits and everything falls to pieces. > > > > > > The knowledge is supposed be limited to which featu

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: > That basically means that if I was, for the sake of fun do > > --- a/drivers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -1197,7 +1197,6 @@ static unsigned int features[] = { > VIRTIO_BALLOON_F_MUST_TEL

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 10:17:10AM +0200, David Hildenbrand wrote: > On 07.04.25 09:52, Michael S. Tsirkin wrote: > > On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: > > > > > > > > Not perfect, but AFAIKS, not horrible. > > > > >

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

2025-04-07 Thread Michael S. Tsirkin
On Mon, Mar 24, 2025 at 02:01:21PM +0800, Jason Wang wrote: > This patch introduces virtqueue ops which is a set of the callbacks > that will be called for different queue layout or features. This would > help to avoid branches for split/packed and will ease the future > implementation like in orde

Re: [PATCH v8 4/8] vhost: Introduce vhost_worker_ops in vhost_worker

2025-04-07 Thread Michael S. Tsirkin
On Fri, Mar 28, 2025 at 06:02:48PM +0800, Cindy Lu wrote: > Abstract vhost worker operations (create/stop/wakeup) into an ops > structure to prepare for kthread mode support. > > Signed-off-by: Cindy Lu I worry about the overhead of indirect calls here. We have the wrappers, and only two option

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: > > > > Not perfect, but AFAIKS, not horrible. > > It is like it is. QEMU does queue exist if the corresponding feature > is offered by the device, and that is what we have to live with. I don't think we can live with this properly tho

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-06 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 03:48:49PM +0200, David Hildenbrand wrote: > On 04.04.25 15:36, Halil Pasic wrote: > > On Fri, 4 Apr 2025 12:55:09 +0200 > > David Hildenbrand wrote: > > > > > For virito-balloon, we should probably do the following: > > > > > > From 38e340c2bb53c2a7cc7c675f5dfdd44ecf77

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-06 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 12:55:09PM +0200, David Hildenbrand wrote: > On 04.04.25 12:00, David Hildenbrand wrote: > > On 04.04.25 06:36, Halil Pasic wrote: > > > On Thu, 3 Apr 2025 16:28:31 +0200 > > > David Hildenbrand wrote: > > > > > > > > Sorry I have to have a look at that discussion. Maybe i

Re: [REGRESSION] Massive virtio-net throughput drop in guest VM with Linux 6.8+

2025-04-05 Thread Michael S. Tsirkin
On Thu, Apr 03, 2025 at 03:51:01PM +0200, Markus Fohrer wrote: > Am Donnerstag, dem 03.04.2025 um 09:04 -0400 schrieb Michael S. > Tsirkin: > > On Wed, Apr 02, 2025 at 11:12:07PM +0200, Markus Fohrer wrote: > > > Hi, > > > > > > I'm observing a signifi

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-05 Thread Michael S. Tsirkin
her > workarounds to not break existing setups. > > Let's fix it without affecting existing setups for now by properly ignoring > the non-existing queues, so the indicator bits will match the queue > indexes. > > [1] https://lore.kernel.org/all/cover.1720611677.git@redh

[PATCH] rseq/selftests: fix name clash with rseq UAPI header

2025-04-05 Thread Michael Jeanson
c967d3c ("rseq/selftests: Ensure the rseq ABI TLS is actually 1024 bytes") Reported-by: Mark Brown Signed-off-by: Michael Jeanson Reviewed-by: Mathieu Desnoyers --- tools/testing/selftests/rseq/rseq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testin

Re: [REGRESSION] Massive virtio-net throughput drop in guest VM with Linux 6.8+

2025-04-05 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 09:59:19AM +0200, Torsten Krah wrote: > Am Mittwoch, dem 02.04.2025 um 23:12 +0200 schrieb Markus Fohrer: > > When running on a host system equipped with a Broadcom NetXtreme-E > > (bnxt_en) NIC and AMD EPYC CPUs, the network throughput in the guest > > drops to 100–200 KB/s

Re: [PATCH net-next v2 0/4] virtio_net: Fixes and improvements

2025-04-04 Thread Michael S. Tsirkin
lso fixes a few minor bugs I found > when writing patches. > > Signed-off-by: Akihiko Odaki Acked-by: Michael S. Tsirkin > --- > Changes in v2: > - Replaced kmalloc() with kzalloc() to initialize the reserved fields. > - Link to v1: > https://lore.kernel.org/r/20250

Re: [PATCH v2] vsock/virtio: Remove queued_replies pushback logic

2025-04-04 Thread Michael S. Tsirkin
On Wed, Apr 02, 2025 at 12:14:24PM -0400, Stefan Hajnoczi wrote: > On Tue, Apr 01, 2025 at 08:13:49PM +, Alexander Graf wrote: > > Ever since the introduction of the virtio vsock driver, it included > > pushback logic that blocks it from taking any new RX packets until the > > TX queue backlog

[GIT PULL] virtio: features, fixes, cleanups

2025-04-04 Thread Michael S. Tsirkin
is now allowed in vduse. vhost-scsi memory use has been reduced. cleanups, fixes all over the place. A couple more fixes are being tested and will be merged after rc1. Signed-off-by: Michael S. Tsirkin Eugenio Pérez (1

Re: [PATCH] virtio: console: Make resizing compliant with virtio spec

2025-04-04 Thread Michael S. Tsirkin
On Wed, Mar 19, 2025 at 06:13:08PM +0100, Halil Pasic wrote: > On Wed, 19 Mar 2025 11:00:06 -0400 > "Michael S. Tsirkin" wrote: > > > > > I was mistaken in my earlier reply - I had missed this > > > > virtio_console_resize definition in the spec.  So in

Re: [PATCH 1/1] virtio_console: fix missing byte order handling for cols and rows

2025-04-04 Thread Michael S. Tsirkin
; > Fixes: 8345adbf96fc1 ("virtio: console: Accept console size along with > > resize control message") > > Signed-off-by: Halil Pasic > > Cc: sta...@vger.kernel.org # v2.6.35+ > > --- > > > > @Michael: I think it would be nice to add a clarification on t

Re: [REGRESSION] Massive virtio-net throughput drop in guest VM with Linux 6.8+

2025-04-04 Thread Michael S. Tsirkin
On Thu, Apr 03, 2025 at 11:24:43PM +0200, Markus Fohrer wrote: > Am Donnerstag, dem 03.04.2025 um 17:06 -0400 schrieb Michael S. > Tsirkin: > > On Thu, Apr 03, 2025 at 10:07:12PM +0200, Markus Fohrer wrote: > > > Am Donnerstag, dem 03.04.2025 um 10:03 -0400 schrieb Mic

Re: [PATCH v2] vsock/virtio: Remove queued_replies pushback logic

2025-04-04 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 10:30:43AM +0200, Stefano Garzarella wrote: > On Fri, Apr 04, 2025 at 04:14:51AM -0400, Michael S. Tsirkin wrote: > > On Fri, Apr 04, 2025 at 10:04:38AM +0200, Alexander Graf wrote: > > > > > > On 03.04.25 14:21, Michael S. Tsirkin wrote: > &g

Re: [REGRESSION] Massive virtio-net throughput drop in guest VM with Linux 6.8+

2025-04-04 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 10:16:55AM +0200, Markus Fohrer wrote: > Am Donnerstag, dem 03.04.2025 um 09:04 -0400 schrieb Michael S. > Tsirkin: > > On Wed, Apr 02, 2025 at 11:12:07PM +0200, Markus Fohrer wrote: > > > Hi, > > > > > > I'm observing a signifi

Re: [PATCH v2] vsock/virtio: Remove queued_replies pushback logic

2025-04-04 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 10:04:38AM +0200, Alexander Graf wrote: > > On 03.04.25 14:21, Michael S. Tsirkin wrote: > > On Wed, Apr 02, 2025 at 12:14:24PM -0400, Stefan Hajnoczi wrote: > > > On Tue, Apr 01, 2025 at 08:13:49PM +, Alexander Graf wrote: > > > > E

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-03 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 06:02:04AM +0200, Halil Pasic wrote: > On Thu, 3 Apr 2025 10:35:33 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Apr 03, 2025 at 04:18:36PM +0200, Halil Pasic wrote: > > > On Wed, 2 Apr 2025 22:36:21 +0200 > [..] > &g

Re: [REGRESSION] Massive virtio-net throughput drop in guest VM with Linux 6.8+

2025-04-03 Thread Michael S. Tsirkin
On Thu, Apr 03, 2025 at 10:07:12PM +0200, Markus Fohrer wrote: > Am Donnerstag, dem 03.04.2025 um 10:03 -0400 schrieb Michael S. > Tsirkin: > > On Thu, Apr 03, 2025 at 03:51:01PM +0200, Markus Fohrer wrote: > > > Am Donnerstag, dem 03.04.2025 um 09:04 -0400 schrieb Mic

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-03 Thread Michael S. Tsirkin
On Thu, Apr 03, 2025 at 04:18:36PM +0200, Halil Pasic wrote: > On Wed, 2 Apr 2025 22:36:21 +0200 > David Hildenbrand wrote: > > > If we finds a vq without a name in our input array in > > virtio_ccw_find_vqs(), we treat it as "non-existing" and set the vq pointer > > to NULL; we will not call vi

Re: [REGRESSION] Massive virtio-net throughput drop in guest VM with Linux 6.8+

2025-04-03 Thread Michael S. Tsirkin
On Wed, Apr 02, 2025 at 11:12:07PM +0200, Markus Fohrer wrote: > Hi, > > I'm observing a significant performance regression in KVM guest VMs using > virtio-net with recent Linux kernels (6.8.1+ and 6.14). > > When running on a host system equipped with a Broadcom NetXtreme-E (bnxt_en) > NIC and

Re: [PATCH v3] vsock/virtio: Remove queued_replies pushback logic

2025-04-02 Thread Michael S. Tsirkin
a fixed threshold (256) of > packets to process. > > Fixes: 0ea9e1d3a9e3 ("VSOCK: Introduce virtio_transport.ko") > Signed-off-by: Alexander Graf Acked-by: Michael S. Tsirkin > --- > > v1 -> v2: > > - Rework to use fixed threshold > > v2 ->

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

2025-03-25 Thread Michael S. Tsirkin
On Mon, Mar 24, 2025 at 12:53:29PM -0700, Daniel Verkamp wrote: > On Mon, Mar 24, 2025 at 7:43 AM Maximilian Immanuel Brandtner > wrote: > > > > According to section 5.3.6.2 (Multiport Device Operation) of the virtio > > spec(version 1.2) a control buffer with the event VIRTIO_CONSOLE_RESIZE > > i

Re: [PATCH v7 8/8] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-03-21 Thread Michael S. Tsirkin
On Mon, Mar 03, 2025 at 01:52:06PM +0800, Jason Wang wrote: > On Sun, Mar 2, 2025 at 10:34 PM Cindy Lu wrote: > > > > Introduce a new config knob `CONFIG_VHOST_ENABLE_FORK_OWNER_IOCTL`, > > to control the availability of the `VHOST_FORK_FROM_OWNER` ioctl. > > When CONFIG_VHOST_ENABLE_FORK_OWNER_IO

Re: [PATCH v7 0/8] vhost: Add support of kthread API

2025-03-21 Thread Michael S. Tsirkin
On Sun, Mar 02, 2025 at 10:32:02PM +0800, Cindy Lu wrote: > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > the vhost now uses vhost_task and operates as a child of the > owner thread. This aligns with containerization principles. > However, this change has caused c

Re: [PATCH] virtio: console: Make resizing compliant with virtio spec

2025-03-19 Thread Michael S. Tsirkin
then cols). > > > > > > Under section 5.3.6.2 multiport device operation for > > > VIRTIO_CONSOLE_RESIZE the spec says the following > > > > > > ``` > > > Sent by the device to indicate a console size change. value is > > > unused. &g

Re: [PATCH net v4 0/3] vsock/bpf: Handle races between sockmap update and connect() disconnecting

2025-03-19 Thread Michael S. Tsirkin
t; Signed-off-by: Michal Luczaj vsock things: Acked-by: Michael S. Tsirkin > --- > Changes in v4: > - Selftest: send signal to only our own process > - Link to v3: > https://lore.kernel.org/r/20250316-vsock-trans-signal-race-v3-0-17a686227...@rbox.co > > Changes in v3: >

Re: [PATCH net-next 0/4] virtio_net: Fixes and improvements

2025-03-19 Thread Michael S. Tsirkin
lso fixes a few minor bugs I found > when writing patches. > > Signed-off-by: Akihiko Odaki Acked-by: Michael S. Tsirkin > --- > Akihiko Odaki (4): > virtio_net: Split struct virtio_net_rss_config > virtio_net: Fix endian with virtio_net_ctrl_rss >

Re: [PATCH] rseq/selftests: ensure the rseq abi TLS is actually 1024 bytes

2025-03-18 Thread Michael Jeanson
On 2025-03-18 10:01, Mark Brown wrote: On Tue, Mar 11, 2025 at 03:21:45PM -0400, Michael Jeanson wrote: Adding the aligned(1024) attribute to the definition of __rseq_abi did not increase its size to 1024, for this attribute to impact the size of __rseq_abi it would need to be added to the

[PATCH] rseq/selftests: ensure the rseq abi TLS is actually 1024 bytes

2025-03-11 Thread Michael Jeanson
to ensure registration will succeed with future extended ABI. Use a union with a dummy member to ensure we allocate 1024 bytes. Signed-off-by: Michael Jeanson Reviewed-by: Mathieu Desnoyers --- tools/testing/selftests/rseq/rseq.c | 21 - 1 file changed, 16 insertions(+), 5 deletion

Re: [PATCH v7 8/8] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-03-03 Thread Michael S. Tsirkin
On Mon, Mar 03, 2025 at 01:52:06PM +0800, Jason Wang wrote: > On Sun, Mar 2, 2025 at 10:34 PM Cindy Lu wrote: > > > > Introduce a new config knob `CONFIG_VHOST_ENABLE_FORK_OWNER_IOCTL`, > > to control the availability of the `VHOST_FORK_FROM_OWNER` ioctl. > > When CONFIG_VHOST_ENABLE_FORK_OWNER_IO

Re: [PATCH net-next v4 3/4] virtio-net: Map NAPIs to queues

2025-02-26 Thread Michael S. Tsirkin
On Wed, Feb 26, 2025 at 03:27:42PM -0500, Joe Damato wrote: > On Wed, Feb 26, 2025 at 01:08:49PM -0500, Joe Damato wrote: > > On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote: > > > On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote: > > > > On Tue, Feb 25, 2025 at 10:05 AM Joe Da

Re: [PATCH net-next v4 3/4] virtio-net: Map NAPIs to queues

2025-02-26 Thread Michael S. Tsirkin
On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote: > On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote: > > On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > > > > > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping > > > can be accessed by user apps, ta

Re: [PATCH v6 5/6] vhost: Add new UAPI to support change to task mode

2025-02-26 Thread Michael S. Tsirkin
; > >+ * be counted in the nproc rlimits. > > > >+ * > > > >+ * When inherit_owner is set to 0: > > > >+ * - The VHOST worker threads will use the traditional kernel thread > > > >(kthread) > > > >+ * implementation, which

Re: [PATCH net-next v4 0/4] virtio-net: Link queues to NAPIs

2025-02-25 Thread Michael S. Tsirkin
e > queues and NAPIs are linked. > > See the commit message of patch 3 for an example of how to get the NAPI > to queue mapping information. > > See the commit message of patch 4 for an example of how NAPI IDs are > persistent despite queue count changes. > > Th

Re: [PATCH v5 2/4] virtio_rtc: Add PTP clocks

2025-02-25 Thread Michael S. Tsirkin
On Tue, Feb 25, 2025 at 02:12:40PM +, Simon Horman wrote: > On Tue, Feb 25, 2025 at 12:28:24PM +0100, Peter Hilber wrote: > > On Mon, Feb 24, 2025 at 05:56:18PM +, Simon Horman wrote: > > > On Wed, Feb 19, 2025 at 08:32:57PM +0100, Peter Hilber wrote: > > > > > > ... > > > > > > > +/** >

Re: [PATCH] vduse: add virtio_fs to allowed dev id

2025-02-25 Thread Michael S. Tsirkin
On Tue, Feb 25, 2025 at 01:17:02PM +0100, Eugenio Perez Martin wrote: > On Mon, Feb 24, 2025 at 10:51 PM Michael S. Tsirkin wrote: > > > > On Tue, Jan 21, 2025 at 11:33:46AM +0100, Eugenio Pérez wrote: > > > A VDUSE device that implements virtiofs device works fine just by

Re: [PATCH v5 0/4] Add virtio_rtc module

2025-02-25 Thread Michael S. Tsirkin
On Wed, Feb 19, 2025 at 08:32:55PM +0100, Peter Hilber wrote: > This series implements a driver for a virtio-rtc device conforming to spec > proposal v7 [1]. It includes a PTP clock driver and an RTC class driver > with alarm. > > v5 updates > == > > Important changes compared to the prev

Re: [PATCH v6 0/6] vhost: Add support of kthread API

2025-02-24 Thread Michael S. Tsirkin
On Sun, Feb 23, 2025 at 11:36:15PM +0800, Cindy Lu wrote: > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > the vhost now uses vhost_task and operates as a child of the > owner thread. This aligns with containerization principles. > However, this change has caused c

Re: [PATCH] vduse: add virtio_fs to allowed dev id

2025-02-24 Thread Michael S. Tsirkin
On Tue, Jan 21, 2025 at 11:33:46AM +0100, Eugenio Pérez wrote: > A VDUSE device that implements virtiofs device works fine just by > adding the device id to the whitelist. > > Signed-off-by: Eugenio Pérez OK, but the commit log really should say why you are doing this. And also why is it safe.

Re: [PATCH v6 5/6] vhost: Add new UAPI to support change to task mode

2025-02-24 Thread Michael S. Tsirkin
better subject: vhost: uapi to control task mode (owner vs kthread) On Sun, Feb 23, 2025 at 11:36:20PM +0800, Cindy Lu wrote: > Add a new UAPI to enable setting the vhost device to task mode. better: Add a new UAPI to configure the vhost device to use the kthread mode > The userspace applica

Re: [PATCH v6 5/6] vhost: Add new UAPI to support change to task mode

2025-02-24 Thread Michael S. Tsirkin
On Sun, Feb 23, 2025 at 11:36:20PM +0800, Cindy Lu wrote: > Add a new UAPI to enable setting the vhost device to task mode. > The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > to configure the mode if necessary. > This setting must be applied before VHOST_SET_OWNER, as the worker > w

Re: [PATCH] virtio: break and reset virtio devices on device_shutdown()

2025-02-24 Thread Michael S. Tsirkin
On Mon, Feb 24, 2025 at 08:49:09AM +0100, Eric Auger wrote: > Hi Michael, > > On 2/21/25 12:42 AM, Michael S. Tsirkin wrote: > > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory > > accesses during the hang. > > > > Invalid read at addr 0

Re: [PATCH] virtio: break and reset virtio devices on device_shutdown()

2025-02-24 Thread Michael S. Tsirkin
On Mon, Feb 24, 2025 at 08:49:09AM +0100, Eric Auger wrote: > Hi Michael, > > On 2/21/25 12:42 AM, Michael S. Tsirkin wrote: > > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory > > accesses during the hang. > > > > Invalid read at addr 0

Re: [PATCH v2 2/5] modules: Refactor + kdoc elf_validity_cached_copy

2025-02-21 Thread MICHAEL TURNER
Remove everything that is attacking me this is invalid All information. Has been stolen I’ve been attacked over 2yrs Please stop all of this I didn’t approve any of this Sent from my iPhone

Re: [PATCH v2 2/5] modules: Refactor + kdoc elf_validity_cached_copy

2025-02-21 Thread MICHAEL TURNER
Remove everything that is attacking me this is invalid All information. Has been stolen I’ve been attacked over 2yrs Please stop all of this I didn’t approve any of this Sent from my iPhone

Re: [PATCH] virtio: break and reset virtio devices on device_shutdown()

2025-02-20 Thread Michael S. Tsirkin
On Fri, Feb 21, 2025 at 09:11:51AM +0800, Jason Wang wrote: > On Fri, Feb 21, 2025 at 7:42 AM Michael S. Tsirkin wrote: > > > > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory > > accesses during the hang. > > > > Invalid read at

[PATCH] virtio: break and reset virtio devices on device_shutdown()

2025-02-20 Thread Michael S. Tsirkin
set on shutdown they continue to poke at guest memory and get errors from the IOMMU. Some devices get wedged then. The problem can be solved by breaking all virtio devices on virtio bus shutdown, then resetting them. Reported-by: Eric Auger Reported-by: Hongyu Ning Signed-off-by: Michael S. Tsirkin

Re: [PATCH net-next] virtio-net: tweak for better TX performance in NAPI mode

2025-02-20 Thread Michael S. Tsirkin
s were eliminated. > > 2) single queue 1 vcpu guest + vhost-net/TAP on the host: single >session netperf from guest to host shows 82% improvement from >31Gb/s to 58Gb/s, %stddev were reduced from 34.5% to 1.9% and 88% >of TX interrupts were eliminated. > > Signed-

Re: [PATCH net-next] virtio-net: tweak for better TX performance in NAPI mode

2025-02-18 Thread Michael S. Tsirkin
On Tue, Feb 18, 2025 at 10:39:08AM +0800, Jason Wang wrote: > There are several issues existed in start_xmit(): > > - Transmitted packets need to be freed before sending a packet, this > introduces delay and increases the average packets transmit > time. This also increase the time that spent

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-02-17 Thread Michael S. Tsirkin
On Tue, Feb 18, 2025 at 07:57:23AM +0800, Ning, Hongyu wrote: > > > On 2025/2/17 17:25, Eric Auger wrote: > > Hi Michael, Hongyu, > > > > On 2/14/25 1:16 PM, Michael S. Tsirkin wrote: > > > On Fri, Feb 14, 2025 at 08:56:56AM +0100, Eric Auger wrote: > >

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-02-17 Thread Michael S. Tsirkin
On Mon, Feb 17, 2025 at 05:59:30PM +0100, Eric Auger wrote: > Hi Michael, > > On 2/17/25 10:25 AM, Eric Auger wrote: > > Hi Michael, Hongyu, > > > > On 2/14/25 1:16 PM, Michael S. Tsirkin wrote: > >> On Fri, Feb 14, 2025 at 08:56:56AM +0100, Eric Auger wrote

Re: [Patch net v3] vsock/virtio: fix variables initialization during resuming

2025-02-14 Thread Michael S. Tsirkin
eceding two variables after a suspend/resume. > > Fixes: bd50c5dc182b ("vsock/virtio: add support for device suspend/resume") > Link: > https://lore.kernel.org/virtualization/20250207052033.629-1-junnan01...@samsung.com/ > Co-developed-by: Ying Gao > Si

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-02-14 Thread Michael S. Tsirkin
On Fri, Feb 14, 2025 at 08:56:56AM +0100, Eric Auger wrote: > Hi, > > On 2/14/25 8:21 AM, Ning, Hongyu wrote: > > > > > > On 2025/2/6 16:59, Eric Auger wrote: > >> Hi, > >> > >> On 2/4/25 12:46 PM, Eric Auger wrote: > >>> Hi,

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-02-03 Thread Michael S. Tsirkin
On Fri, Jan 31, 2025 at 10:53:15AM +0100, Eric Auger wrote: > Hi Kirill, Michael > > On 8/8/24 9:51 AM, Kirill A. Shutemov wrote: > > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory > > accesses during the hang. > > > > Invalid read at

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-01-31 Thread Michael S. Tsirkin
On Fri, Jan 31, 2025 at 10:53:15AM +0100, Eric Auger wrote: > Hi Kirill, Michael > > On 8/8/24 9:51 AM, Kirill A. Shutemov wrote: > > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory > > accesses during the hang. > > > > Invalid read at

[GIT PULL] virtio: features, fixes, cleanups

2025-01-27 Thread Michael S. Tsirkin
compliance virtio-mem now works with kdump on s390 Small cleanups all over the place. Signed-off-by: Michael S. Tsirkin Akihiko Odaki (1): vhost/net: Set num_buffers for virtio 1.0 David Hildenbrand (12): fs/proc/vmcore

Re: [PATCH v4 7/8] vhost: Add new UAPI to support change to task mode

2025-01-21 Thread Michael S. Tsirkin
On Wed, Jan 22, 2025 at 10:07:19AM +0800, Cindy Lu wrote: > Ping for review, Hi MST and Jason, do you have any comments on this? > Thanks > Cindy I see there are unaddressed comments by Jason and Stefano.

Re: [PATCH v4] vdpa: solidrun: Replace deprecated PCI functions

2025-01-20 Thread Michael S. Tsirkin
On Mon, Jan 20, 2025 at 10:13:03AM +0100, Philipp Stanner wrote: > On Thu, 2024-12-19 at 10:51 +0100, Stefano Garzarella wrote: > > On Thu, Dec 19, 2024 at 10:44:29AM +0100, Philipp Stanner wrote: > > > From: Philipp Stanner > > > > > > The PCI functions > > > > > > pcim_iomap_regions() > > >

Re: [PATCH] vhost/scsi: Fix improper cleanup in vhost_scsi_set_endpoint()

2025-01-14 Thread Michael S. Tsirkin
On Sun, Jan 12, 2025 at 03:19:44PM -0600, Mike Christie wrote: > On 1/12/25 11:35 AM, michael.chris...@oracle.com wrote: > > So I think to fix the issue, we would want to: > > > > 1. move the > > > > memcpy(vs_tpg, vs->vs_tpg, len); > > > > to the end of the function after we do the vhost_scsi_f

Re: [PATCH] vhost/scsi: Fix improper cleanup in vhost_scsi_set_endpoint()

2025-01-12 Thread michael . christie
On 1/10/25 9:34 PM, Haoran Zhang wrote: > Since commit 3f8ca2e115e55 ("vhost scsi: alloc cmds per vq instead of > session"), a bug can be triggered when the host sends a duplicate > VHOST_SCSI_SET_ENDPOINT ioctl command. I don't think that git commit is correct. It should be: 25b98b64e284 ("vho

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2025-01-10 Thread Michael S. Tsirkin
On Fri, Jan 10, 2025 at 11:32:46AM +0800, Jason Wang wrote: > On Wed, Jan 8, 2025 at 7:35 PM Michael S. Tsirkin wrote: > > > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > > There's no need to sync DMA for CPU on mapping errors. So this patch &g

Re: [PATCH net 1/2] vsock/virtio: discard packets if the transport changes

2025-01-09 Thread Michael S. Tsirkin
On Thu, Jan 09, 2025 at 10:01:31AM +0100, Stefano Garzarella wrote: > On Wed, Jan 08, 2025 at 02:31:19PM -0500, Hyunwoo Kim wrote: > > On Wed, Jan 08, 2025 at 07:06:16PM +0100, Stefano Garzarella wrote: > > > If the socket has been de-assigned or assigned to another transport, > > > we must discard

Re: [PATCH net 2/2] vsock/bpf: return early if transport is not assigned

2025-01-09 Thread Michael S. Tsirkin
110b4 ("vsock: support sockmap") > Reported-by: Michal Luczaj > Closes: > https://lore.kernel.org/netdev/5ca20d4c-1017-49c2-9516-f6f75fd33...@rbox.co/ > Signed-off-by: Stefano Garzarella Acked-by: Michael S. Tsirkin > --- > net/vmw_vsock/vsock_bpf.c | 9 + >

Re: [PATCH v5 0/6] vhost: Add support of kthread API

2025-01-08 Thread Michael S. Tsirkin
On Mon, Dec 30, 2024 at 08:43:47PM +0800, Cindy Lu wrote: > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > the vhost now uses vhost_task and operates as a child of the > owner thread. This aligns with containerization principles. > However, this change has caused c

Re: [PATCH v5 5/6] vhost: Add new UAPI to support change to task mode

2025-01-08 Thread Michael S. Tsirkin
On Thu, Jan 02, 2025 at 11:36:58AM +0800, Jason Wang wrote: > On Mon, Dec 30, 2024 at 8:45 PM Cindy Lu wrote: > > > > Add a new UAPI to enable setting the vhost device to task mode. > > The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > > to configure the mode if necessary. > > This

Re: [PATCH v5 5/6] vhost: Add new UAPI to support change to task mode

2025-01-08 Thread Michael S. Tsirkin
On Mon, Dec 30, 2024 at 08:43:52PM +0800, Cindy Lu wrote: > Add a new UAPI to enable setting the vhost device to task mode. > The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > to configure the mode if necessary. > This setting must be applied before VHOST_SET_OWNER, as the worker > w

  1   2   3   4   5   6   7   8   9   10   >