Re: Virtio-IOMMU interrupt remapping design

2025-06-17 Thread Michael S. Tsirkin
On Tue, Jun 17, 2025 at 04:57:20PM -0300, Jason Gunthorpe wrote: > On Tue, Jun 17, 2025 at 03:44:20PM -0400, Michael S. Tsirkin wrote: > > On Mon, Jun 16, 2025 at 10:20:31AM -0300, Jason Gunthorpe wrote: > > > On Sun, Jun 15, 2025 at 02:47:15PM -0400, Demi Marie Obenour wrote: &

Re: Virtio-IOMMU interrupt remapping design

2025-06-17 Thread Michael S. Tsirkin
On Sun, Jun 15, 2025 at 02:47:15PM -0400, Demi Marie Obenour wrote: > Virtio-IOMMU interrupt remapping turned out to be much harder than I > realized. The main problem is that interrupt remapping is set up > very early in boot. In fact, Linux calls the interrupt remapping probe > function from th

Re: Virtio-IOMMU interrupt remapping design

2025-06-17 Thread Michael S. Tsirkin
On Mon, Jun 16, 2025 at 10:20:31AM -0300, Jason Gunthorpe wrote: > On Sun, Jun 15, 2025 at 02:47:15PM -0400, Demi Marie Obenour wrote: > > > Is a paravirtualized IOMMU with interrupt remapping something that makes > > sense? > > IMHO linking interrupt remapping to the iommu is a poor design, > in

Re: [PATCH net] vsock/virtio: fix `rx_bytes` accounting for stream sockets

2025-06-11 Thread Michael S. Tsirkin
On Thu, Jun 12, 2025 at 01:32:01PM +0800, Xuewei Niu wrote: > No comments since last month. > > The patch [1], which adds SIOCINQ ioctl support for vsock, depends on this > patch. Could I get more eyes on this one? > > [1]: > https://lore.kernel.org/lkml/bbn4lvdwh42m2zvi3rdyws66y5ulew32rchtz3kxi

Re: [PATCH v11 3/3] vhost: Add configuration controls for vhost worker's mode

2025-06-11 Thread Michael S. Tsirkin
On Mon, Jun 09, 2025 at 03:33:09PM +0800, Cindy Lu wrote: > This patch introduces functionality to control the vhost worker mode: > > - Add two new IOCTLs: > * VHOST_SET_FORK_FROM_OWNER: Allows userspace to select between > task mode (fork_owner=1) and kthread mode (fork_owner=0) > * VHOST

Re: [PATCH v11 0/3] vhost: Add support of kthread API

2025-06-11 Thread Michael S. Tsirkin
On Mon, Jun 09, 2025 at 03:33:06PM +0800, Cindy Lu wrote: > In this series, a new UAPI is implemented to allow > userspace applications to configure their thread mode. > Changelog v2: > 1. Change the module_param's name to enforce_inherit_owner, and the default > value is true. > 2. Change

Re: [PATCH RESEND v10 1/3] vhost: Add a new modparam to allow userspace select kthread

2025-06-01 Thread Michael S. Tsirkin
On Sat, May 31, 2025 at 05:57:26PM +0800, Cindy Lu wrote: > The vhost now uses vhost_task and workers as a child of the owner thread. > While this aligns with containerization principles, it confuses some > legacy userspace applications, therefore, we are reintroducing kthread > API support. > > A

Re: [PATCH RESEND v10 3/3] vhost: Add new UAPI to select kthread mode and KConfig to enable this IOCTL

2025-06-01 Thread Michael S. Tsirkin
On Sat, May 31, 2025 at 05:57:28PM +0800, Cindy Lu wrote: > This patch introduces a new UAPI that allows the vhost device to select > in kthread mode. Userspace applications can utilize IOCTL > VHOST_FORK_FROM_OWNER to select between task and kthread modes, which > must be invoked before IOCTL VHOS

Re: [PATCH V2 00/19] virtio_ring in order support

2025-05-28 Thread Michael S. Tsirkin
On Wed, May 28, 2025 at 02:42:15PM +0800, Jason Wang wrote: > Hello all: > > This sereis tries to implement the VIRTIO_F_IN_ORDER to > virtio_ring. This is done by introducing virtqueue ops so we can > implement separate helpers for different virtqueue layout/features > then the in-order were impl

[GIT PULL] virtio, vhost: features, fixes

2025-05-28 Thread Michael S. Tsirkin
fixes A new virtio RTC driver. vhost scsi now logs write descriptors so migration works. Some hardening work in virtio core. An old spec compliance issue fixed in vhost net. A couple of cleanups, fixes in vringh, virtio-pci, vdpa. Signed-off-by: Michael S. Ts

Re: [PATCH v3] media: add virtio-media driver

2025-05-27 Thread Michael S. Tsirkin
On Tue, May 27, 2025 at 04:39:27PM +0200, Mauro Carvalho Chehab wrote: > > It's up to you though. > > I can keep it in next for now, so it gets some coverage by > > tools scanning that tree. > > Sure, feel free to keep it on next if you prefer so. Just > please don't submit it upstream while we do

[PATCH] virtio: document ENOSPC

2025-05-27 Thread Michael S. Tsirkin
drivers handle ENOSPC specially since it's an error one can get from a working VQ. Document the semantics. Reported-by: Parav Pandit Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/virtio/virtio_ring.c b/dr

Re: [PATCH v3] media: add virtio-media driver

2025-05-27 Thread Michael S. Tsirkin
> > drivers/media/virtio/scatterlist_builder.h | 111 +++ > > drivers/media/virtio/session.h | 109 +++ > > drivers/media/virtio/virtio_media.h| 93 ++ > > drivers/media/virtio/virtio_media_driver.c | 959 > > driver

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

2025-05-18 Thread Michael S. Tsirkin
heck and disablement, it triggers an EPT_MISCONFIG vmexit to attempt to > kick the vhost worker. This may happen while the worker is still > processing the sendmsg, leading to wasteful exit(s). > > This is particularly problematic for single-threaded guest submission > threads, a

Re: [PATCH 00/19] virtio_ring in order support

2025-05-18 Thread Michael S. Tsirkin
On Wed, Mar 26, 2025 at 07:39:47AM +0100, Eugenio Perez Martin wrote: > On Mon, Mar 24, 2025 at 3:44 PM Lei Yang wrote: > > > > QE tested this series of patches with virtio-net regression tests, > > everything works fine. > > > > Hi Lei, > > Is it possible to test this series also with virtio-ne

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

2025-05-18 Thread Michael S. Tsirkin
ken". >[Alex] > - Fix typos and stale comments. [Kevin, Binbin] > - Use "trigger" instead of the null token/eventfd pointer on failure in >vfio_msi_set_vector_signal(). [Kevin] > - Drop a redundant "tmp == consumer" check from patch 3. [Kevin] >

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

2025-05-16 Thread Michael S. Tsirkin
On Fri, May 16, 2025 at 09:31:42AM +0800, Jason Wang wrote: > On Thu, May 15, 2025 at 2:14 PM Michael S. Tsirkin wrote: > > > > On Wed, May 14, 2025 at 10:52:58AM +0800, Jason Wang wrote: > > > On Tue, May 13, 2025 at 3:09 PM Michael S. Tsirkin > > > wrote: >

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

2025-05-16 Thread Michael S. Tsirkin
On Fri, May 16, 2025 at 09:30:01AM +0800, Jason Wang wrote: > On Wed, May 14, 2025 at 10:24 PM Michael S. Tsirkin wrote: > > > > On Wed, May 14, 2025 at 10:19:05AM -0400, Michael S. Tsirkin wrote: > > > On Wed, Apr 09, 2025 at 12:06:03PM +0800, Jason Wang wrote: > >

Re: [PATCH v4] vdpa/octeon_ep: Control PCI dev enabling manually

2025-05-15 Thread Michael S. Tsirkin
the last of 12 drivers blocking me from removing a few hundred > lines of broken code from PCI. Would be great if it could be sent to > Linus next merge window. > > Can someone take this patch in? > > Thx > P. I intend to, working on packing things up for -next as we speak. >

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

2025-05-14 Thread Michael S. Tsirkin
On Wed, May 14, 2025 at 10:52:58AM +0800, Jason Wang wrote: > On Tue, May 13, 2025 at 3:09 PM Michael S. Tsirkin wrote: > > > > On Tue, May 13, 2025 at 12:08:51PM +0800, Jason Wang wrote: > > > On Wed, Apr 30, 2025 at 5:27 PM Michael S. Tsirkin > > > wrote: >

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

2025-05-14 Thread Michael S. Tsirkin
On Wed, May 14, 2025 at 10:19:05AM -0400, Michael S. Tsirkin wrote: > On Wed, Apr 09, 2025 at 12:06:03PM +0800, Jason Wang wrote: > > On Tue, Apr 8, 2025 at 7:37 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Apr 08, 2025 at 03:02:35PM +0800, Jason Wang wrote: >

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

2025-05-14 Thread Michael S. Tsirkin
On Wed, Apr 09, 2025 at 12:06:03PM +0800, Jason Wang wrote: > On Tue, Apr 8, 2025 at 7:37 PM Michael S. Tsirkin wrote: > > > > 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: > > > > &

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

2025-05-13 Thread Michael S. Tsirkin
On Tue, May 13, 2025 at 12:08:51PM +0800, Jason Wang wrote: > On Wed, Apr 30, 2025 at 5:27 PM Michael S. Tsirkin wrote: > > > > 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: >

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

2025-05-11 Thread Michael S. Tsirkin
On Sun, May 11, 2025 at 09:14:28PM +0930, samiuddinsami.md...@gmail.com wrote: > From: Sami Uddin > > Prevent usage of shared memory regions where the length is zero, > as such configurations are not valid and may lead to unexpected behavior. > > Signed-off-by: Sami Uddin > --- > v2: > - Fixed

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

2025-05-01 Thread Michael S. Tsirkin
heck and disablement, it triggers an EPT_MISCONFIG vmexit to attempt to > kick the vhost worker. This may happen while the worker is still > processing the sendmsg, leading to wasteful exit(s). > > This is particularly problematic for single-threaded guest submission > threads, a

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
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: > > > > On Mon, Apr 21, 2025 at 11:45 AM Jason Wang wrote: > > > > > > On Mon, Apr 21, 2025 at 10:45 AM Cindy Lu wrote: > > > > > > > > Introduce a new config knob `CONFIG_VHOST_ENABL

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
On Thu, Apr 24, 2025 at 01:48:53PM +0200, Paolo Abeni wrote: > On 4/20/25 3:05 AM, Jon Kohler wrote: > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > > index b9b9e9d40951..9b04025eea66 100644 > > --- a/drivers/vhost/net.c > > +++ b/drivers/vhost/net.c > > @@ -769,13 +769,17 @@ static vo

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
;fn(work); > > + kcov_remote_stop(); > > + cond_resched(); > > + } > > + } > > + kthread_unuse_mm(dev->mm); > > + > > + return 0; > > +} > > + > >

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

2025-04-21 Thread Michael S. Tsirkin
> + > static bool vhost_run_work_list(void *data) > { > struct vhost_worker *worker = data; > @@ -582,6 +621,46 @@ long vhost_dev_check_owner(struct vhost_dev *dev) > } > EXPORT_SYMBOL_GPL(vhost_dev_check_owner); > > +struct vhost_attach_cgroups_struct { > +

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

2025-04-20 Thread Michael S. Tsirkin
heck and disablement, it triggers an EPT_MISCONFIG vmexit to attempt to > kick the vhost worker. This may happen while the worker is still > processing the sendmsg, leading to wasteful exit(s). > > This is particularly problematic for single-threaded guest submission > threads, a

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
onally. > > > +\item[deflateq] Exists unconditionally. > > > +\item[statsq] Only exists if VIRTIO_BALLOON_F_STATS_VQ is set. > > > +\item[free_page_vq] Only exists if VIRTIO_BALLOON_F_FREE_PAGE_HINT is > > > set. > > > +\item[reporting_vq] Only exists if

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

2025-04-06 Thread Michael S. Tsirkin
n't particularly like getting queried for non-existing > > queues. [1] So the fix was not for a hypervisor that was out of spec, but > > because quering non-existing queues didn't work. > > > > The fix implied that if VIRTIO_BALLOON_F_STATS_VQ is missing, suddenly th

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

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

2025-04-05 Thread Michael S. Tsirkin
; drops to 100–200 KB/s. The same guest configuration performs normally > > (~100 MB/s) when using kernel 6.8.0 or when the VM is moved to a host > > with Intel NICs. > > Hi, > > as I am affected too, here is the link to the Ubuntu issue, just in > case someone wants

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
On Wed, Apr 02, 2025 at 05:26:59PM +0200, Halil Pasic wrote: > On Sat, 22 Mar 2025 01:29:54 +0100 > Halil Pasic wrote: > > > As per virtio spec the fields cols and rows are specified as little > > endian. > [..] > > @Amit: Any feedback? > > > > > Fixes: 8345adbf96fc1 ("virtio: console: Accept

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
reme-E (bnxt_en) > NIC and AMD EPYC CPUs, the network throughput in the guest drops to 100–200 > KB/s. The same guest configuration performs normally (~100 MB/s) when using > kernel 6.8.0 or when the VM is moved to a host with Intel NICs. > > Test environment: > - Host: QEMU/KVM

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
ge the ioctl name VHOST_SET_INHERIT_FROM_OWNER to > VHOST_FORK_FROM_OWNER > 3. reuse the function __vhost_worker_flush > 4. use a ops sturct to support worker relates function > 5. reset the value of inherit_owner in vhost_dev_reset_owner s. > > Changelog v7: > 1. add a K

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

2025-03-19 Thread Michael S. Tsirkin
On Wed, Mar 19, 2025 at 02:00:44PM +0100, Maximilian Immanuel Brandtner wrote: > On Tue, 2025-03-18 at 15:25 +0100, Amit Shah wrote: > > On Tue, 2025-03-18 at 11:07 +0100, Maximilian Immanuel Brandtner > > wrote: > > > On Mon, 2025-03-03 at 12:54 +0100, Amit Shah wrote: > > > > On Tue, 2025-02-25 a

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 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
On Wed, Feb 26, 2025 at 09:46:06AM +0100, Stefano Garzarella wrote: > Hi Cindy, > > On Wed, 26 Feb 2025 at 07:14, Cindy Lu wrote: > > > > On Tue, Feb 25, 2025 at 7:31 PM Stefano Garzarella > > wrote: > > > > > > On Sun, Feb 23, 2025 at 11:36:20PM +0800, Cindy Lu wrote: > > > >Add a new UAPI to

[PATCH 2/9] selftests/x86/xstate: Refactor XSAVE helpers for general use

2025-02-25 Thread Chang S. Bae
low-level XSAVE helpers for saving and restoring register states, as well as handling XSAVE buffers. * Generalizing state data manipuldations: set_rand_data() * Introducing a generic feature query helper: get_xstate_info() While doing so, remove unused defines in amx.c. Signed-off-by: Chang S

[PATCH 0/9] selftests/x86/xstate: Introduce common code for testing extended states

2025-02-25 Thread Chang S. Bae
-spike.ostc.intel.com/ [2] https://lore.kernel.org/lkml/20210518200320.17239-1-chang.seok@intel.com/ [3] https://www.intel.com/content/www/us/en/developer/articles/technical/advanced-performance-extensions-apx.html Chang S. Bae (9): selftests/x86: Consolidate redundant signal helper functions selftests

[PATCH 1/9] selftests/x86: Consolidate redundant signal helper functions

2025-02-25 Thread Chang S. Bae
the error handling by using ksft_exit_fail_msg(), which is functionally equivalent with err() within the selftest framework. Signed-off-by: Chang S. Bae --- This change is a prerequisite for the upcoming xstate selftest, which requires signal handling for registering and cleaning up handlers

[PATCH 9/9] selftests/x86/avx: Add AVX test

2025-02-25 Thread Chang S. Bae
Add xstate testing specifically for those vector register states, validating kernel's context switching and ensuring ABI compliance. Use the established xstate testing framework. Signed-off-by: Chang S. Bae --- Alternatively, this invocation could be placed directly in xstate.c::main(). Ho

[PATCH 7/9] selftests/x86/xstate: Consolidate test invocations into a single entry

2025-02-25 Thread Chang S. Bae
function that first verifies feature availability from the kernel and constructs the necessary state information once. The wrapper then sequentially invokes all tests to ensure consistent execution. Update the AMX test to use this unified invocation. Signed-off-by: Chang S. Bae --- tools/testing

[PATCH 8/9] selftests/x86/xstate: Clarify supported xstates

2025-02-25 Thread Chang S. Bae
The established xstate test code is designed to be generic, but certain xstates require special handling and cannot be tested without additional adjustments. Clarify which xstates are currently supported, and enforce testing only for them. Signed-off-by: Chang S. Bae --- tools/testing

[PATCH 4/9] selftests/x86/xstate: Refactor context switching test

2025-02-25 Thread Chang S. Bae
the test from dynamic states, remove the permission request code. In fact, The permission request inside the test wrapper was redundant. Additionally, replace fatal_error() with ksft_exit_fail_msg() for consistency in error handling. Signed-off-by: Chang S. Bae --- Expected output: $ amx_64

[PATCH 5/9] selftests/x86/xstate: Refactor ptrace ABI test

2025-02-25 Thread Chang S. Bae
ith ksft_exit_fail_msg() for consistency in error handling. Signed-off-by: Chang S. Bae --- Expected out: $ amx_64 ... [RUN] AMX Tile data: inject xstate via ptrace(). [OK]'xfeatures' in SW reserved area was correctly written [OK]xstate was correctly updated. --- tools/testing/selfte

[PATCH 6/9] selftests/x86/xstate: Introduce signal ABI test

2025-02-25 Thread Chang S. Bae
. Signed-off-by: Chang S. Bae --- Expected output: $ amx_64 ... [RUN] AMX Tile data: load xstate and raise SIGUSR1 [OK]'magic1' is valid [OK]'xfeatures' in SW reserved area is valid [OK]'xfeatures' in XSAVE header is valid [OK]xstate delivery was succes

[PATCH 3/9] selftests/x86/xstate: Enumerate and name xstate components

2025-02-25 Thread Chang S. Bae
xstate_info to include a name field, providing a human-readable identifier. Signed-off-by: Chang S. Bae --- tools/testing/selftests/x86/amx.c| 2 - tools/testing/selftests/x86/xstate.h | 60 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/tools/testing

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: > > > > > > ... > > > > > > > +/** >

  1   2   3   4   5   6   7   8   9   10   >