Re: [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check

2023-07-23 Thread Michael S. Tsirkin
On Sun, Jul 23, 2023 at 04:05:07PM +0800, Lin Ma wrote: > The vdpa_nl_policy structure is used to validate the nlattr when parsing > the incoming nlmsg. It will ensure the attribute being described produces > a valid nlattr pointer in info->attrs before entering into each handler > in vdpa_nl_ops.

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-07-23 Thread Michael S. Tsirkin
On Sat, Jul 22, 2023 at 11:03:29PM -0500, michael.chris...@oracle.com wrote: > On 7/20/23 8:06 AM, Michael S. Tsirkin wrote: > > On Thu, Feb 02, 2023 at 05:25:17PM -0600, Mike Christie wrote: > >> For vhost workers we use the kthread API which inherit's its values from >

Re: [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check

2023-07-23 Thread Michael S. Tsirkin
On Sun, Jul 23, 2023 at 05:33:54PM +0800, Lin Ma wrote: > Hello Michael, > > > > > > > The vdpa_nl_policy structure is used to validate the nlattr when parsing > > > the incoming nlmsg. It will ensure the attribute being described produces > > > a valid nlattr pointer in info->attrs before enterin

Re: [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check

2023-07-23 Thread Michael S. Tsirkin
On Sun, Jul 23, 2023 at 05:48:46PM +0800, Lin Ma wrote: > > > Sure, that is another undergoing task I'm working on. If the nlattr is > > parsed with > > NL_VALIDATE_UNSPEC, any forgotten nlattr will be rejected, therefore (which > > is the default > > for modern nla_parse). > > For the general

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-07-23 Thread Michael S. Tsirkin
On Fri, Jul 21, 2023 at 10:18:03PM +0200, Maxime Coquelin wrote: > > > On 7/21/23 17:10, Michael S. Tsirkin wrote: > > On Fri, Jul 21, 2023 at 04:58:04PM +0200, Maxime Coquelin wrote: > > > > > > > > > On 7/21/23 16:45, Michael S. Tsirkin wrote: > &

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-07-24 Thread Michael S. Tsirkin
On Mon, Jul 24, 2023 at 02:52:05PM +0800, Jason Wang wrote: > On Sat, Jul 22, 2023 at 4:18 AM Maxime Coquelin > wrote: > > > > > > > > On 7/21/23 17:10, Michael S. Tsirkin wrote: > > > On Fri, Jul 21, 2023 at 04:58:04PM +0200, Maxime Coquelin wrote: > &g

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-07-24 Thread Michael S. Tsirkin
On Mon, Jul 24, 2023 at 02:52:49PM +0800, Jason Wang wrote: > On Mon, Jul 24, 2023 at 2:46 PM Michael S. Tsirkin wrote: > > > > On Fri, Jul 21, 2023 at 10:18:03PM +0200, Maxime Coquelin wrote: > > > > > > > > > On 7/21/23 17:10, Michael S. Tsirkin wrote:

Re: [PATCH net-next V3 3/4] virtio_net: support per queue interrupt coalesce command

2023-07-24 Thread Michael S. Tsirkin
utilization of guest > VM. > > Signed-off-by: Gavin Li > Reviewed-by: Dragos Tatulea > Reviewed-by: Jiri Pirko > Acked-by: Michael S. Tsirkin > --- > drivers/net/virtio_net.c| 120 > include/uapi/linux/virtio_net.h | 14

Re: [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check

2023-07-24 Thread Michael S. Tsirkin
On Mon, Jul 24, 2023 at 08:38:04AM +, Dragos Tatulea wrote: > > On Mon, 2023-07-24 at 15:11 +0800, Jason Wang wrote: > > On Sun, Jul 23, 2023 at 6:02 PM Michael S. Tsirkin wrote: > > > > > > On Sun, Jul 23, 2023 at 05:48:46PM +0800, Lin Ma wrote: > >

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-07-24 Thread Michael S. Tsirkin
On Thu, Jul 20, 2023 at 03:34:01PM +0800, Xuan Zhuo wrote: > On Wed, 19 Jul 2023 23:57:51 -0700, Christoph Hellwig > wrote: > > On Thu, Jul 20, 2023 at 02:45:14PM +0800, Xuan Zhuo wrote: > > > virtqueue_dma_dev() return the device that working with the DMA APIs. > > > Then that can be used like

Re: [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check

2023-07-24 Thread Michael S. Tsirkin
On Mon, Jul 24, 2023 at 11:42:42AM +, Dragos Tatulea wrote: > On Mon, 2023-07-24 at 05:16 -0400, Michael S. Tsirkin wrote: > > On Mon, Jul 24, 2023 at 08:38:04AM +, Dragos Tatulea wrote: > > > > > > On Mon, 2023-07-24 at 15:11 +0800, Jason Wang wrote: > &

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-07-25 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 10:13:48AM +0800, Xuan Zhuo wrote: > On Mon, 24 Jul 2023 09:43:42 -0700, Christoph Hellwig > wrote: > > On Thu, Jul 20, 2023 at 01:21:07PM -0400, Michael S. Tsirkin wrote: > > > Well I think we can add wrappers like virtio_dma_sync and so on. > &

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-07-25 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 11:07:40AM +0800, Jason Wang wrote: > On Mon, Jul 24, 2023 at 3:17 PM Michael S. Tsirkin wrote: > > > > On Mon, Jul 24, 2023 at 02:52:05PM +0800, Jason Wang wrote: > > > On Sat, Jul 22, 2023 at 4:18 AM Maxime Coquelin > > > wrote: > &

Re: [PATCH net] virtio-net: fix race between set queues and probe

2023-07-25 Thread Michael S. Tsirkin
> it, use _virtnet_set_queues() to avoid holding rtnl as the device is > not even registered at that time. > > Fixes: a220871be66f ("virtio-net: correctly enable multiqueue") > Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin stable material I guess? > --- > dri

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Michael S. Tsirkin
On Fri, Jul 21, 2023 at 12:42:45AM +0300, Arseniy Krasnov wrote: > This adds handling of MSG_ZEROCOPY flag on transmission path: if this > flag is set and zerocopy transmission is possible (enabled in socket > options and transport allows zerocopy), then non-linear skb will be > created and filled

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Michael S. Tsirkin
On Fri, Jul 21, 2023 at 08:09:03AM +0300, Arseniy Krasnov wrote: > > > On 21.07.2023 00:42, Arseniy Krasnov wrote: > > This adds handling of MSG_ZEROCOPY flag on transmission path: if this > > flag is set and zerocopy transmission is possible (enabled in socket > > options and transport allows ze

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 11:39:22AM +0300, Arseniy Krasnov wrote: > > > On 25.07.2023 11:25, Michael S. Tsirkin wrote: > > On Fri, Jul 21, 2023 at 12:42:45AM +0300, Arseniy Krasnov wrote: > >> This adds handling of MSG_ZEROCOPY flag on transmission path: if this >

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 02:28:02PM +0200, Stefano Garzarella wrote: > On Tue, Jul 25, 2023 at 12:16:11PM +0300, Arseniy Krasnov wrote: > > > > > > On 25.07.2023 11:46, Arseniy Krasnov wrote: > > > > > > > > > On 25.07.2023 11:43, Stefano Garzarella wrote: > > > > On Fri, Jul 21, 2023 at 08:09:0

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 02:53:39PM +0200, Stefano Garzarella wrote: > On Tue, Jul 25, 2023 at 07:50:53AM -0400, Michael S. Tsirkin wrote: > > On Fri, Jul 21, 2023 at 08:09:03AM +0300, Arseniy Krasnov wrote: > > > > > > > > > On 21.07.2023 00:42, Arseniy Krasn

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 04:04:13PM +0300, Arseniy Krasnov wrote: > > > On 25.07.2023 14:50, Michael S. Tsirkin wrote: > > On Fri, Jul 21, 2023 at 08:09:03AM +0300, Arseniy Krasnov wrote: > >> > >> > >> On 21.07.2023 00:42, Arseniy Krasnov wrote: > &

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 04:10:40PM +0300, Arseniy Krasnov wrote: > > > On 25.07.2023 14:59, Michael S. Tsirkin wrote: > > On Tue, Jul 25, 2023 at 11:39:22AM +0300, Arseniy Krasnov wrote: > >> > >> > >> On 25.07.2023 11:25, Michael S. Tsirkin wrote: >

Re: [PATCH net-next v3 4/4] vsock/virtio: MSG_ZEROCOPY flag support

2023-07-25 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 04:28:14PM +0300, Arseniy Krasnov wrote: > > > On 25.07.2023 16:22, Michael S. Tsirkin wrote: > > On Tue, Jul 25, 2023 at 04:04:13PM +0300, Arseniy Krasnov wrote: > >> > >> > >> On 25.07.2023 14:50, Michael S. Tsirkin wrote: >

Re: [PATCH net-next v3 0/4] virtio/vsock: some updates for MSG_PEEK flag

2023-07-26 Thread Michael S. Tsirkin
size of buffer from 2) of course). >4) Read whole buffer without any flags, then checks that it is same > as buffer from 3). > > 4) This is MSG_PEEK test for SOCK_SEQPACKET. It works in the same way >as for SOCK_STREAM, except it also checks combination of MSG_TRUNC >

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-07-26 Thread Michael S. Tsirkin
On Wed, Jul 26, 2023 at 09:55:37AM +0800, Jason Wang wrote: > On Tue, Jul 25, 2023 at 3:36 PM Michael S. Tsirkin wrote: > > > > On Tue, Jul 25, 2023 at 11:07:40AM +0800, Jason Wang wrote: > > > On Mon, Jul 24, 2023 at 3:17 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH v1] vdpa: Complement vdpa_nl_policy for nlattr length check

2023-07-26 Thread Michael S. Tsirkin
On Tue, Jul 25, 2023 at 08:26:32AM +, Dragos Tatulea wrote: > On Mon, 2023-07-24 at 16:08 -0400, Michael S. Tsirkin wrote: > > On Mon, Jul 24, 2023 at 11:42:42AM +, Dragos Tatulea wrote: > > > On Mon, 2023-07-24 at 05:16 -0400, Michael S. Tsirkin wrote: > > > &

Re: [PATCH 0/2] vdpa: Enable strict validation for netlink ops

2023-07-26 Thread Michael S. Tsirkin
On Wed, Jul 26, 2023 at 09:30:48PM +0300, Dragos Tatulea wrote: > The original patch from Lin Ma enables the vdpa driver to use validation > netlink ops. > > The second patch simply disables the validation skip which is no longer > neccesary. Patchset started of from this discussion [0]. > > [0]

Re: [PATCH RFC net-next v5 10/14] virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-07-26 Thread Michael S. Tsirkin
On Wed, Jul 19, 2023 at 12:50:14AM +, Bobby Eshleman wrote: > This commit adds a feature bit for virtio vsock to support datagrams. > > Signed-off-by: Jiang Wang > Signed-off-by: Bobby Eshleman > --- > include/uapi/linux/virtio_vsock.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH RFC net-next v5 11/14] vhost/vsock: implement datagram support

2023-07-26 Thread Michael S. Tsirkin
On Wed, Jul 19, 2023 at 12:50:15AM +, Bobby Eshleman wrote: > This commit implements datagram support for vhost/vsock by teaching > vhost to use the common virtio transport datagram functions. > > If the virtio RX buffer is too small, then the transmission is > abandoned, the packet dropped, a

Re: [PATCH] vdpa/mlx5: Fix crash on shutdown for when no ndev exists

2023-07-26 Thread Michael S. Tsirkin
On Wed, Jul 26, 2023 at 10:07:38PM +0300, Dragos Tatulea wrote: > The ndev was accessed on shutdown without a check if it actually exists. > This triggered the crash pasted below. This patch simply adds a check > before using ndev. > > BUG: kernel NULL pointer dereference, address: 03

Re: [PATCH 0/2] vdpa: Enable strict validation for netlink ops

2023-07-26 Thread Michael S. Tsirkin
On Wed, Jul 26, 2023 at 07:23:50PM +, Dragos Tatulea wrote: > On Wed, 2023-07-26 at 20:56 +0200, Dragos Tatulea wrote: > > On Wed, 2023-07-26 at 14:36 -0400, Michael S. Tsirkin wrote: > > > On Wed, Jul 26, 2023 at 09:30:48PM +0300, Dragos Tatulea wrote: > > > >

Re: [PATCH 0/2] vdpa: Enable strict validation for netlink ops

2023-07-26 Thread Michael S. Tsirkin
On Wed, Jul 26, 2023 at 06:56:24PM +, Dragos Tatulea wrote: > On Wed, 2023-07-26 at 14:36 -0400, Michael S. Tsirkin wrote: > > On Wed, Jul 26, 2023 at 09:30:48PM +0300, Dragos Tatulea wrote: > > > The original patch from Lin Ma enables the vdpa driver to use validation

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-07-26 Thread Michael S. Tsirkin
On Thu, Jul 27, 2023 at 02:03:59PM +0800, Jason Wang wrote: > On Wed, Jul 26, 2023 at 7:38 PM Michael S. Tsirkin wrote: > > > > On Wed, Jul 26, 2023 at 09:55:37AM +0800, Jason Wang wrote: > > > On Tue, Jul 25, 2023 at 3:36 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH RFC net-next v5 00/14] virtio/vsock: support datagrams

2023-07-27 Thread Michael S. Tsirkin
On Wed, Jul 19, 2023 at 12:50:04AM +, Bobby Eshleman wrote: > Hey all! > > This series introduces support for datagrams to virtio/vsock. > > It is a spin-off (and smaller version) of this series from the summer: > > https://lore.kernel.org/all/cover.1660362668.git.bobby.eshle...@bytedance.

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-07-27 Thread Michael S. Tsirkin
On Thu, Jul 27, 2023 at 04:59:33PM +0800, Jason Wang wrote: > > They really shouldn't - any NIC that takes forever to > > program will create issues in the networking stack. > > Unfortunately, it's not rare as the device/cvq could be implemented > via firmware or software. Currently that mean one

Re: [PATCH] vdpa/mlx5: Fix crash on shutdown for when no ndev exists

2023-07-27 Thread Michael S. Tsirkin
On Thu, Jul 27, 2023 at 04:02:16PM +, Dragos Tatulea wrote: > On Wed, 2023-07-26 at 15:26 -0400, Michael S. Tsirkin wrote: > > On Wed, Jul 26, 2023 at 10:07:38PM +0300, Dragos Tatulea wrote: > > > The ndev was accessed on shutdown without a check if it actually exists. > &

Re: [PATCH net-next V4 2/3] virtio_net: support per queue interrupt coalesce command

2023-07-27 Thread Michael S. Tsirkin
; configuration. > > > > Signed-off-by: Gavin Li > > Reviewed-by: Dragos Tatulea > > Reviewed-by: Jiri Pirko > > Acked-by: Michael S. Tsirkin > > FTR, this patch is significantly different from the version previously > acked/reviewed, I'm unsure if al

Re: [PATCH net-next v4 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-07-27 Thread Michael S. Tsirkin
On Fri, Jul 28, 2023 at 01:26:23AM +0300, Arseniy Krasnov wrote: > Hello, > > this patchset is first of three parts of another big patchset for > MSG_ZEROCOPY flag support: > https://lore.kernel.org/netdev/20230701063947.3422088-1-avkras...@sberdevices.ru/ overall looks good. Two points I'd like

Re: [PATCH] vdpa/mlx5: Fix crash on shutdown for when no ndev exists

2023-07-31 Thread Michael S. Tsirkin
On Mon, Jul 31, 2023 at 07:15:31AM +, Dragos Tatulea wrote: > On Thu, 2023-07-27 at 12:28 -0400, Michael S. Tsirkin wrote: > > On Thu, Jul 27, 2023 at 04:02:16PM +, Dragos Tatulea wrote: > > > On Wed, 2023-07-26 at 15:26 -0400, Michael S. Tsirkin wrote: > > > &

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-01 Thread Michael S. Tsirkin
On Fri, Jul 28, 2023 at 02:02:33PM +0800, Xuan Zhuo wrote: > On Tue, 25 Jul 2023 19:07:23 +0800, Xuan Zhuo > wrote: > > On Tue, 25 Jul 2023 03:34:34 -0400, "Michael S. Tsirkin" > > wrote: > > > On Tue, Jul 25, 2023 at 10:13:48AM +0800, Xuan Zhuo wrote:

Re: [PATCH] vdpa/mlx5: Fix crash on shutdown for when no ndev exists

2023-08-03 Thread Michael S. Tsirkin
; On Tue, 2023-08-01 at 11:59 +0800, Jason Wang wrote: > > > > > On Mon, Jul 31, 2023 at 5:08 PM Michael S. Tsirkin > > > > > wrote: > > > > > > > > > > > > On Mon, Jul 31, 2023 at 07:15:31AM +, Dragos Tatulea wrote: > > &g

Re: [PATCH v4] virtio_pmem: add the missing REQ_OP_WRITE for flush bio

2023-08-06 Thread Michael S. Tsirkin
On Fri, Aug 04, 2023 at 09:03:20PM +, Verma, Vishal L wrote: > On Fri, 2023-08-04 at 20:39 +0200, Pankaj Gupta wrote: > > Gentle ping! > > > > Dan, Vishal for suggestion/review on this patch and request for merging. > > +Cc Michael for awareness, as virtio-pmem device is currently broken. > >

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-07 Thread Michael S. Tsirkin
On Tue, Aug 08, 2023 at 01:43:02PM +0800, Jason Wang wrote: > On Tue, Aug 8, 2023 at 1:11 PM Yuan Yao wrote: > > > > In current packed virtqueue implementation, the avail_wrap_counter won't > > flip, in the case when the driver supplies a descriptor chain with a > > length equals to the queue size

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-08 Thread Michael S. Tsirkin
On Tue, Aug 08, 2023 at 05:37:29PM +0900, Yuan Yao wrote: > Thank you for reviewing, sent a patch with your ack. Don't do this pls. And don't top post please. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxf

Re: [PATCH net] virtio-net: set queues after driver_ok

2023-08-08 Thread Michael S. Tsirkin
; spec. Fixing this by setting queues after virtio_device_ready(). > > Fixes: 25266128fe16 ("virtio-net: fix race between set queues and probe") > Reported-by: Dragos Tatulea > Signed-off-by: Jason Wang Acked-by: Michael S. Tsirkin > --- > The patch is needed for -stabl

Re: [PATCH net] virtio-net: set queues after driver_ok

2023-08-08 Thread Michael S. Tsirkin
On Wed, Aug 09, 2023 at 02:45:17PM +0800, Jason Wang wrote: > On Wed, Aug 9, 2023 at 2:23 PM Dragos Tatulea wrote: > > > > On Tue, 2023-08-08 at 23:13 -0400, Jason Wang wrote: > > > Commit 25266128fe16 ("virtio-net: fix race between set queues and > > > probe") tries to fix the race between set qu

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-09 Thread Michael S. Tsirkin
On Thu, Aug 10, 2023 at 09:56:54AM +0800, Xuan Zhuo wrote: > > Ping!! > > Could we push this to the next linux version? > > Thanks. You sent v12, so not this one for sure. v12 triggered kbuild warnings, you need to fix them and repost. Note that I'm on vacation from monday, so if you want this

Re: [PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()

2023-08-09 Thread Michael S. Tsirkin
On Thu, Aug 10, 2023 at 02:37:20PM +0800, Jason Wang wrote: > On Thu, Aug 10, 2023 at 9:59 AM Xuan Zhuo wrote: > > > > > > Ping!! > > > > Could we push this to the next linux version? > > How about implementing the wrappers along with virtqueue_dma_dev() to > see if Christoph is happy? > > Thank

Re: [PATCH] virtio-net: Zero max_tx_vq field for VIRTIO_NET_CTRL_MQ_HASH_CONFIG case

2023-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2023 at 11:15:57AM +0800, Hawkins Jiawei wrote: > Kernel uses `struct virtio_net_ctrl_rss` to save command-specific-data > for both the VIRTIO_NET_CTRL_MQ_HASH_CONFIG and > VIRTIO_NET_CTRL_MQ_RSS_CONFIG commands. > > According to the VirtIO standard, "Field reserved MUST contain ze

Re: [PATCH] virtio-net: Zero max_tx_vq field for VIRTIO_NET_CTRL_MQ_HASH_CONFIG case

2023-08-10 Thread Michael S. Tsirkin
quot;drivers/net/virtio_net: Added basic RSS support.") Cc: Andrew Melnychenko Acked-by: Michael S. Tsirkin And this is stable material I believe. > --- > > TestStep > > 1. Boot QEMU with one virtio-net-pci net device with `mq` and `hash` > feature on, command

Re: [PATCH 0/2] vdpa/mlx5: Fixes for ASID handling

2023-08-10 Thread Michael S. Tsirkin
On Wed, Aug 02, 2023 at 08:12:16PM +0300, Dragos Tatulea wrote: > This patch series is based on Eugenio's fix for handling CVQs in > a different ASID [0]. > > The first patch is the actual fix. > > The next 2 patches are fixing a possible issue that I found while > implementing patch 1. The patch

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-08-10 Thread Michael S. Tsirkin
On Sat, Jul 22, 2023 at 11:03:29PM -0500, michael.chris...@oracle.com wrote: > On 7/20/23 8:06 AM, Michael S. Tsirkin wrote: > > On Thu, Feb 02, 2023 at 05:25:17PM -0600, Mike Christie wrote: > >> For vhost workers we use the kthread API which inherit's its values from >

Re: [PATCH v1 0/2] vduse: add support for networking devices

2023-08-10 Thread Michael S. Tsirkin
On Tue, Jun 27, 2023 at 01:36:50PM +0200, Maxime Coquelin wrote: > This small series enables virtio-net device type in VDUSE. > With it, basic operation have been tested, both with > virtio-vdpa and vhost-vdpa using DPDK Vhost library series > adding VDUSE support using split rings layout (merged i

Re: [PATCH v3 0/3] vduse: add support for networking devices

2023-08-10 Thread Michael S. Tsirkin
On Wed, Jul 05, 2023 at 12:04:27PM +0200, Maxime Coquelin wrote: > This small series enables virtio-net device type in VDUSE. > With it, basic operation have been tested, both with > virtio-vdpa and vhost-vdpa using DPDK Vhost library series > adding VDUSE support using split rings layout (merged i

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-10 Thread Michael S. Tsirkin
On Tue, Aug 08, 2023 at 07:05:38PM +0900, Yuan Yao wrote: > Sorry, but please ignore this thread. ok, dropped. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH V3 04/14] virtio-blk: limit max allowed submit queues

2023-08-10 Thread Michael S. Tsirkin
inconsistency causes driver to apply > wrong queue mapping for handling IO, and IO timeout is triggered. > > Meantime, single queue makes much less resource utilization, and reduce > risk of kernel failure. > > Cc: Michael S. Tsirkin > Cc: Jason Wang > Cc: virtualization@lis

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-08-10 Thread Michael S. Tsirkin
On Tue, Aug 08, 2023 at 10:30:56AM +0800, Jason Wang wrote: > On Mon, Jul 31, 2023 at 2:30 PM Jason Wang wrote: > > > > On Thu, Jul 27, 2023 at 5:46 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Jul 27, 2023 at 04:59:33PM +0800, Jason Wang wrote: > > >

Re: [PATCH] virtio_mmio: add suspend and resume calls for virtio_mmio devices

2023-08-10 Thread Michael S. Tsirkin
On Fri, Jul 28, 2023 at 12:31:27PM +0530, Anvesh Jain P wrote: > Handle suspend and resume calls for virtio mmio devices from > PM core. Expose these notifications to virtio drivers that can quiesce and > resume vq operations. Update virtio pm ops to handle freeze& restore and > suspend & resume ca

Re: [PATCH] virtio: a new vcpu watchdog driver

2023-08-10 Thread Michael S. Tsirkin
On Mon, Jul 31, 2023 at 09:25:12AM +0800, zhanghao1 wrote: > A new virtio pci driver is added for listening to vcpus > inside guest. Each vcpu creates a corresponding thread to > periodically send data to qemu's back-end watchdog device. > If a vCPU is in the stall state, data cannot be sent to > b

Re: [PATCH v3 0/3] vduse: add support for networking devices

2023-08-10 Thread Michael S. Tsirkin
On Thu, Aug 10, 2023 at 02:29:49PM -0700, Jakub Kicinski wrote: > On Thu, 10 Aug 2023 15:04:27 -0400 Michael S. Tsirkin wrote: > > Another question is that with this userspace can inject > > packets directly into net stack. Should we check CAP_NET_ADMIN > > or such? > >

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-08-10 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 10:23:15AM +0800, Jason Wang wrote: > On Fri, Aug 11, 2023 at 3:41 AM Michael S. Tsirkin wrote: > > > > On Tue, Aug 08, 2023 at 10:30:56AM +0800, Jason Wang wrote: > > > On Mon, Jul 31, 2023 at 2:30 PM Jason Wang wrote: > > > > >

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 05:18:51PM +0800, Jason Wang wrote: > On Fri, Aug 11, 2023 at 1:42 PM Michael S. Tsirkin wrote: > > > > On Fri, Aug 11, 2023 at 10:23:15AM +0800, Jason Wang wrote: > > > On Fri, Aug 11, 2023 at 3:41 AM Michael S. Tsirkin > > > wrote: >

Re: [PATCH] virtio_vdpa: build affinity masks conditionally

2023-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 05:15:39AM -0400, Jason Wang wrote: > We try to build affinity mask via create_affinity_masks() > unconditionally which may lead several issues: > > - the affinity mask is not used for parent without affinity support > (only VDUSE support the affinity now) > - the logic o

Re: [PATCH] virtio_vdpa: build affinity masks conditionally

2023-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 05:41:44PM +0800, Jason Wang wrote: > On Fri, Aug 11, 2023 at 5:25 PM Michael S. Tsirkin wrote: > > > > On Fri, Aug 11, 2023 at 05:15:39AM -0400, Jason Wang wrote: > > > We try to build affinity mask via create_affinity_masks() > > > uncon

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 05:43:25PM +0800, Jason Wang wrote: > On Fri, Aug 11, 2023 at 5:21 PM Michael S. Tsirkin wrote: > > > > On Fri, Aug 11, 2023 at 05:18:51PM +0800, Jason Wang wrote: > > > On Fri, Aug 11, 2023 at 1:42 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH net-next v4 2/2] virtio-net: add cond_resched() to the command waiting loop

2023-08-11 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 05:54:15PM +0800, Jason Wang wrote: > On Fri, Aug 11, 2023 at 5:51 PM Michael S. Tsirkin wrote: > > > > On Fri, Aug 11, 2023 at 05:43:25PM +0800, Jason Wang wrote: > > > On Fri, Aug 11, 2023 at 5:21 PM Michael S. Tsirkin > > > wrote: >

Re: [PATCH v11 8/8] vhost: use vhost_tasks for worker threads

2023-08-13 Thread Michael S. Tsirkin
On Fri, Aug 11, 2023 at 01:51:36PM -0500, Mike Christie wrote: > On 8/10/23 1:57 PM, Michael S. Tsirkin wrote: > > On Sat, Jul 22, 2023 at 11:03:29PM -0500, michael.chris...@oracle.com wrote: > >> On 7/20/23 8:06 AM, Michael S. Tsirkin wrote: > >>> On Thu, Feb 02,

[GIT PULL] virtio: bugfixes

2023-08-13 Thread Michael S. Tsirkin
: Michael S. Tsirkin Allen Hubbe (2): pds_vdpa: reset to vdpa specified mac pds_vdpa: alloc irq vectors on DRIVER_OK David Hildenbrand (4): virtio-mem: remove unsafe unplug in Big Block Mode (BBM) virtio-mem

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-14 Thread Michael S. Tsirkin
On Mon, Aug 14, 2023 at 04:56:53PM +0800, Xuan Zhuo wrote: > On Mon, 14 Aug 2023 11:05:49 +0800, Jason Wang wrote: > > On Thu, Aug 10, 2023 at 8:31 PM Xuan Zhuo > > wrote: > > > > > > Added virtqueue_dma_dev() to get DMA device for virtio. Then the > > > caller can do dma operation in advance. T

Re: [PATCH vhost v13 05/12] virtio_ring: introduce virtqueue_dma_dev()

2023-08-15 Thread Michael S. Tsirkin
On Tue, Aug 15, 2023 at 03:50:23PM +0800, Jason Wang wrote: > On Tue, Aug 15, 2023 at 2:32 PM Xuan Zhuo wrote: > > > > > > Hi, Jason > > > > Could you skip this patch? > > I'm fine with either merging or dropping this. > > > > > Let we review other patches firstly? > > I will be on vacation soo

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-27 Thread Michael S. Tsirkin
unched? > > On Tue, Aug 8, 2023 at 7:00 PM Yuan Yao wrote: > > Sorry for the confusing mail, I didn't understand how it works. > Thanks > > On Tue, Aug 8, 2023 at 6:13 PM Michael S. Tsirkin wrote: > > On Tue, Aug 08, 2023 at 05:37:29PM +0900,

Re: [PATCH v3 0/3] vduse: add support for networking devices

2023-08-29 Thread Michael S. Tsirkin
On Tue, Aug 29, 2023 at 03:34:06PM +0200, Maxime Coquelin wrote: > > > On 8/11/23 00:00, Jakub Kicinski wrote: > > On Thu, 10 Aug 2023 17:42:11 -0400 Michael S. Tsirkin wrote: > > > > Directly into the stack? I thought VDUSE is vDPA in user space, > > > >

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-08-29 Thread Michael S. Tsirkin
On Tue, Aug 29, 2023 at 09:29:45PM +, Bobby Eshleman wrote: > This adds support for datagrams to the virtio-vsock device. > > virtio-vsock already supports stream and seqpacket types. The existing > message types and header fields are extended to support datagrams. > Semantic differences betwe

Re: [PATCH v3 0/3] vduse: add support for networking devices

2023-08-30 Thread Michael S. Tsirkin
On Wed, Aug 30, 2023 at 01:27:18PM +0200, Maxime Coquelin wrote: > > > On 8/29/23 19:05, Michael S. Tsirkin wrote: > > On Tue, Aug 29, 2023 at 03:34:06PM +0200, Maxime Coquelin wrote: > > > > > > > > > On 8/11/23 00:00, Jakub Kicinski wrote: > >

Re: [PATCH net-next V1 0/4] virtio_net: add per queue interrupt coalescing support

2023-08-30 Thread Michael S. Tsirkin
On Fri, Jul 14, 2023 at 10:10:51AM +0800, Xuan Zhuo wrote: > On Thu, 13 Jul 2023 07:40:12 -0400, "Michael S. Tsirkin" > wrote: > > On Mon, Jul 10, 2023 at 12:20:01PM +0300, Gavin Li wrote: > > > Currently, coalescing parameters are grouped for all transmit and

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-09-01 Thread Michael S. Tsirkin
On Wed, Aug 30, 2023 at 12:43:03AM +, Bobby Eshleman wrote: > On Tue, Aug 29, 2023 at 06:21:35PM -0400, Michael S. Tsirkin wrote: > > On Tue, Aug 29, 2023 at 09:29:45PM +, Bobby Eshleman wrote: > > > This adds support for datagrams to the virtio-vsock device. > &g

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-09-02 Thread Michael S. Tsirkin
On Sat, Sep 02, 2023 at 04:56:42AM +, Bobby Eshleman wrote: > On Fri, Sep 01, 2023 at 02:45:14PM +0200, Stefano Garzarella wrote: > > On Tue, Aug 29, 2023 at 09:29:45PM +, Bobby Eshleman wrote: > > > This adds support for datagrams to the virtio-vsock device. > > > > > > virtio-vsock alrea

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-09-02 Thread Michael S. Tsirkin
On Sat, Sep 02, 2023 at 04:37:19AM +, Bobby Eshleman wrote: > On Fri, Sep 01, 2023 at 09:31:03AM -0400, Michael S. Tsirkin wrote: > > On Wed, Aug 30, 2023 at 12:43:03AM +, Bobby Eshleman wrote: > > > On Tue, Aug 29, 2023 at 06:21:35PM -0400, Michael S. Tsirkin wrote: >

[GIT PULL] virtio: features

2023-09-03 Thread Michael S. Tsirkin
can be sure we got the security store right. Signed-off-by: Michael S. Tsirkin Eugenio Pérez (4): vdpa: add VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK flag vdpa: accept VHOST_BACKEND_F_ENABLE_AFTER_DRIVER_OK backend feature

Re: [PATCH] virtio-vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2023-09-06 Thread Michael S. Tsirkin
On Sat, Sep 02, 2023 at 09:24:26AM +, Bobby Eshleman wrote: > On Sat, Sep 02, 2023 at 04:41:28AM -0400, Michael S. Tsirkin wrote: > > On Sat, Sep 02, 2023 at 04:37:19AM +, Bobby Eshleman wrote: > > > On Fri, Sep 01, 2023 at 09:31:03AM -0400, Michael S. Tsirkin wrote: >

Re: [PATCH net-next] virtio: kdoc for struct virtio_pci_modern_device

2023-09-12 Thread Michael S. Tsirkin
-off-by: Shannon Nelson > Acked-by: Eugenio Pérez Acked-by: Michael S. Tsirkin > --- > include/linux/virtio_pci_modern.h | 34 --- > 1 file changed, 22 insertions(+), 12 deletions(-) > > diff --git a/include/linux/virtio_pci_modern.h >

Re: [PATCH net-next] virtio: kdoc for struct virtio_pci_modern_device

2023-09-12 Thread Michael S. Tsirkin
On Mon, Sep 11, 2023 at 02:31:04PM -0700, Shannon Nelson wrote: > Finally following up to Simon's suggestion for some kdoc attention > on struct virtio_pci_modern_device. > > Link: https://lore.kernel.org/netdev/ze%2fqs0lnuvxfa...@corigine.com/ > Cc: Simon Horman > Signed-off-by: Shannon Nelson

Re: [PATCH net-next v9 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-09-18 Thread Michael S. Tsirkin
Documentation/. > 3) Updates for tests and utils. > > This series enables handling of fragged skbs in virtio and vhost parts. > Newly logic won't be triggered, because SO_ZEROCOPY options is still > impossible to enable at this moment (next bunch of patches from big > set a

Re: virtio-sound linux driver conformance to spec

2023-09-19 Thread Michael S. Tsirkin
On Wed, Sep 13, 2023 at 05:04:24PM +0200, Matias Ezequiel Vara Larsen wrote: > Hello, > > This email is to report a behavior of the Linux virtio-sound driver that > looks like it is not conforming to the VirtIO specification. The kernel > driver is moving buffers from the used ring to the availabl

Re: virtio-sound linux driver conformance to spec

2023-09-19 Thread Michael S. Tsirkin
On Tue, Sep 19, 2023 at 04:18:57PM +0200, Matias Ezequiel Vara Larsen wrote: > On Tue, Sep 19, 2023 at 05:43:56AM -0400, Michael S. Tsirkin wrote: > > On Wed, Sep 13, 2023 at 05:04:24PM +0200, Matias Ezequiel Vara Larsen wrote: > > > Hello, > > > > > > This

Re: [PATCH net-next v9 0/4] vsock/virtio/vhost: MSG_ZEROCOPY preparations

2023-09-19 Thread Michael S. Tsirkin
On Tue, Sep 19, 2023 at 03:35:51PM +0200, Stefano Garzarella wrote: > On Tue, Sep 19, 2023 at 03:19:54PM +0200, Paolo Abeni wrote: > > On Tue, 2023-09-19 at 09:54 +0200, Stefano Garzarella wrote: > > > On Mon, Sep 18, 2023 at 07:56:00PM +0300, Arseniy Krasnov wrote: > > > > Hi Stefano, > > > > > >

Re: [PATCH vfio 10/11] vfio/virtio: Expose admin commands over virtio device

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:39PM +0300, Yishai Hadas wrote: > Expose admin commands over the virtio device, to be used by the > vfio-virtio driver in the next patches. > > It includes: list query/use, legacy write/read, read notify_info. > > Signed-off-by: Yishai Hadas I don't get the motiva

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
> MAINTAINERS | 6 + > drivers/vfio/pci/Kconfig | 2 + > drivers/vfio/pci/Makefile| 2 + > drivers/vfio/pci/virtio/Kconfig | 15 + > drivers/vfio/pci/virtio/Makefile | 4 + > drivers/vfio/pci/virtio/cmd.c| 4 +- > drivers/vfio/pci/virtio/cmd.h

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:40PM +0300, Yishai Hadas wrote: > +#define VIRTIO_LEGACY_IO_BAR_HEADER_LEN 20 > +#define VIRTIO_LEGACY_IO_BAR_MSIX_HEADER_LEN 4 This is exactly part of VIRTIO_PCI_CONFIG_OFF duplicated. -- MST ___ Virtualization mailing l

Re: [PATCH vfio 01/11] virtio-pci: Use virtio pci device layer vq info instead of generic one

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:30PM +0300, Yishai Hadas wrote: > From: Feng Liu > > Currently VQ deletion callback vp_del_vqs() processes generic > virtio_device level VQ list instead of VQ information available at PCI > layer. > > To adhere to the layering, use the pci device level VQ informatio

Re: [PATCH vfio 03/11] virtio-pci: Introduce admin virtqueue

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:40:32PM +0300, Yishai Hadas wrote: > From: Feng Liu > > Introduce support for the admin virtqueue. By negotiating > VIRTIO_F_ADMIN_VQ feature, driver detects capability and creates one > administration virtqueue. Administration virtqueue implementation in > virtio pci g

Re: [PATCH v14 30/42] virtio_pci: introduce helper to get/set queue reset

2023-09-21 Thread Michael S. Tsirkin
On Mon, Aug 01, 2022 at 02:38:50PM +0800, Xuan Zhuo wrote: > Introduce new helpers to implement queue reset and get queue reset > status. > > https://github.com/oasis-tcs/virtio-spec/issues/124 > https://github.com/oasis-tcs/virtio-spec/issues/139 > > Signed-off-by: Xuan Zhuo > Acked-by: Jason

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 11:11:25AM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 09:16:21AM -0400, Michael S. Tsirkin wrote: > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > > index bf0f54c24f81..5098418c8389 100644 > > > --- a/MAINTAINERS > >

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 01:41:39PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 10:16:04AM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 11:11:25AM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 09:16:21AM -0400, Michae

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 01:52:24PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 10:43:50AM -0600, Alex Williamson wrote: > > > > With that code in place a legacy driver in the guest has the look and > > > feel as if having a transitional device with legacy support for both its > > > con

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 02:07:09PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 01:01:12PM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 01:52:24PM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 10:43:50AM -0600, Alex Williamson wrote: >

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 05:09:04PM +, Parav Pandit wrote: > > > > From: Michael S. Tsirkin > > Sent: Thursday, September 21, 2023 10:31 PM > > > Another question I'm interested in is whether there's actually a performance > > benefit to using this

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 02:44:50PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 01:21:26PM -0400, Michael S. Tsirkin wrote: > > Yea it's very useful - it's also useful for vdpa whether this patchset > > goes in or not. At some level, if vdpa can't keep up

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:39:26PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 12:53:04PM -0400, Michael S. Tsirkin wrote: > > > vdpa is not vfio, I don't know how you can suggest vdpa is a > > > replacement for a vfio driver. They are completely different >

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:39:26PM -0300, Jason Gunthorpe wrote: > > What is the huge amount of work am I asking to do? > > You are asking us to invest in the complexity of VDPA through out > (keep it working, keep it secure, invest time in deploying and > debugging in the field) I'm asking you t

Re: [PATCH vfio 11/11] vfio/virtio: Introduce a vfio driver over virtio devices

2023-09-21 Thread Michael S. Tsirkin
On Thu, Sep 21, 2023 at 03:16:37PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 01:55:42PM -0400, Michael S. Tsirkin wrote: > > > That's not what I'm asking about though - not what shadow vq does, > > shadow vq is a vdpa feature. > > That's just

<    1   2   3   4   5   6   7   8   9   10   >