[PATCH V2] virtio-mmio: harden interrupt

2021-11-25 Thread Jason Wang
This patch tries to make sure the virtio interrupt handler for MMIO won't be called after a reset and before virtio_device_ready(). We can't use IRQF_NO_AUTOEN since we're using shared interrupt (IRQF_SHARED). So this patch tracks the interrupt enabling status in a new intr_soft_enabled variable an

Re: [PATCH] virtio-mmio: harden interrupt

2021-11-25 Thread Jason Wang
On Thu, Nov 25, 2021 at 8:08 PM kernel test robot wrote: > > Hi Jason, > > I love your patch! Perhaps something to improve: > > [auto build test WARNING on linus/master] > [also build test WARNING on v5.16-rc2 next-20211125] > [If your patch is applied to the wrong git tre

Re: [PATH v1 2/2] vdpa/mlx5: Add support for reading descriptor statistics

2021-11-25 Thread Jason Wang
On Thu, Nov 25, 2021 at 3:59 PM Eli Cohen wrote: > > On Thu, Nov 25, 2021 at 12:57:53PM +0800, Jason Wang wrote: > > On Thu, Nov 25, 2021 at 12:56 AM Eli Cohen wrote: > > > > > > Implement the get_vq_stats calback of vdpa_config_ops to return the > > > statistics for a virtqueue. > > > > > > Sign

Re: [PATCH] vdpa: Consider device id larger than 31

2021-11-25 Thread Jason Wang
On Fri, Nov 26, 2021 at 2:09 AM Parav Pandit wrote: > > virtio device id value can be more than 31. Hence, use BIT_ULL in > assignment. > > Fixes: 33b347503f01 ("vdpa: Define vdpa mgmt device, ops and a netlink > interface") > Reported-by: kernel test robot > Reported-by: Dan Carpenter > Signed

[PATCH v2] virtio/vsock: fix the transport to work with VMADDR_CID_ANY

2021-11-25 Thread Wei Wang
The VMADDR_CID_ANY flag used by a socket means that the socket isn't bound to any specific CID. For example, a host vsock server may want to be bound with VMADDR_CID_ANY, so that a guest vsock client can connect to the host server with CID=VMADDR_CID_HOST (i.e. 2), and meanwhile, a host vsock clien

[PATCH AUTOSEL 5.15 7/7] virtio-mem: support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE

2021-11-25 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 61082ad6a6e1f999eef7e7e90046486c87933b1e ] The initial virtio-mem spec states that while unplugged memory should not be read, the device still has to allow for reading unplugged memory inside the usable region. The primary motivation for this default han

[PATCH AUTOSEL 5.10 3/4] virtio-mem: support VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE

2021-11-25 Thread Sasha Levin
From: David Hildenbrand [ Upstream commit 61082ad6a6e1f999eef7e7e90046486c87933b1e ] The initial virtio-mem spec states that while unplugged memory should not be read, the device still has to allow for reading unplugged memory inside the usable region. The primary motivation for this default han

RE: [PATCH] virtio/vsock: fix the transport to work with VMADDR_CID_ANY

2021-11-25 Thread Wang, Wei W
On Thursday, November 25, 2021 6:41 PM, Stefano Garzarella wrote: > On Thu, Nov 25, 2021 at 09:27:40AM +, Wang, Wei W wrote: > >On Thursday, November 25, 2021 3:16 PM, Wang, Wei W wrote: > >> - /* Update CID in case it has changed after a transport reset event */ > >> - vsk->local_addr.svm_ci

Re: [PATCH] Bluetooth: virtio_bt: fix device removal

2021-11-25 Thread Michael S. Tsirkin
On Thu, Nov 25, 2021 at 10:58:56PM +0100, Marcel Holtmann wrote: > Hi Michael, > > > Device removal is clearly out of virtio spec: it attempts to remove > > unused buffers from a VQ before invoking device reset. To fix, make > > open/close NOPs and do all cleanup/setup in probe/remove.

Re: [PATCH] virtio/vsock: fix the transport to work with VMADDR_CID_ANY

2021-11-25 Thread kernel test robot
Hi Wei, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mst-vhost/linux-next] [also build test WARNING on net-next/master net/master linus/master v5.16-rc2 next-20211125] [If your patch is applied to the wrong git tree, kindly drop us a note. And when

Re: [PATCH] Bluetooth: virtio_bt: fix device removal

2021-11-25 Thread Michael S. Tsirkin
On Thu, Nov 25, 2021 at 10:01:25PM +0100, Marcel Holtmann wrote: > Hi Michael, > > >>> Device removal is clearly out of virtio spec: it attempts to remove > >>> unused buffers from a VQ before invoking device reset. To fix, make > >>> open/close NOPs and do all cleanup/setup in probe/remove. > >>

Re: [PATCH] Bluetooth: virtio_bt: fix device removal

2021-11-25 Thread Michael S. Tsirkin
On Thu, Nov 25, 2021 at 09:02:01PM +0100, Marcel Holtmann wrote: > Hi Michael, > > > Device removal is clearly out of virtio spec: it attempts to remove > > unused buffers from a VQ before invoking device reset. To fix, make > > open/close NOPs and do all cleanup/setup in probe/remove. > > so the

Re: [PATCH] net/mlx5_vdpa: Offer VIRTIO_NET_F_MTU when setting MTU

2021-11-25 Thread Michael S. Tsirkin
On Thu, Nov 25, 2021 at 06:27:15PM +, Parav Pandit wrote: > > > > From: Eli Cohen > > Sent: Thursday, November 25, 2021 1:32 PM > > > > On Thu, Nov 25, 2021 at 07:29:18AM +0200, Parav Pandit wrote: > > > > > > > > > > From: Eli Cohen > > > > Sent: Wednesday, November 24, 2021 10:40 PM > >

RE: [PATH v1 1/2] vdpa: Add support for querying vendor statistics

2021-11-25 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Thursday, November 25, 2021 1:37 PM > > On Thu, Nov 25, 2021 at 07:34:21AM +0200, Parav Pandit wrote: > > > > > > > From: Eli Cohen > > > Sent: Wednesday, November 24, 2021 10:26 PM > > > > > > Add support for querying virtqueue statistics. Supported statistics are:

RE: [PATCH] net/mlx5_vdpa: Offer VIRTIO_NET_F_MTU when setting MTU

2021-11-25 Thread Parav Pandit via Virtualization
> From: Eli Cohen > Sent: Thursday, November 25, 2021 1:32 PM > > On Thu, Nov 25, 2021 at 07:29:18AM +0200, Parav Pandit wrote: > > > > > > > From: Eli Cohen > > > Sent: Wednesday, November 24, 2021 10:40 PM > > > > > > Make sure to offer VIRTIO_NET_F_MTU since we configure the MTU based > >

[PATCH] vdpa: Consider device id larger than 31

2021-11-25 Thread Parav Pandit via Virtualization
virtio device id value can be more than 31. Hence, use BIT_ULL in assignment. Fixes: 33b347503f01 ("vdpa: Define vdpa mgmt device, ops and a netlink interface") Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Parav Pandit --- drivers/vdpa/vdpa.c | 2 +- 1 file changed

[PATCH] Bluetooth: virtio_bt: fix device removal

2021-11-25 Thread Michael S. Tsirkin
Device removal is clearly out of virtio spec: it attempts to remove unused buffers from a VQ before invoking device reset. To fix, make open/close NOPs and do all cleanup/setup in probe/remove. The cost here is a single skb wasted on an unused bt device - which seems modest. NB: with this fix in

Re: [PATCH] net/mlx5_vdpa: Increase the limit on the number of virtuques

2021-11-25 Thread Michael S. Tsirkin
On Thu, Nov 25, 2021 at 09:29:53AM +0200, Eli Cohen wrote: > On Thu, Nov 25, 2021 at 02:21:43AM -0500, Michael S. Tsirkin wrote: > > On Wed, Nov 24, 2021 at 07:19:53PM +0200, Eli Cohen wrote: > > > Increase the limit on the maximum number of supported virtqueues to 256 > > > to match hardware capab

Re: [PATCH] virtio-mmio: harden interrupt

2021-11-25 Thread kernel test robot
Hi Jason, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.16-rc2 next-20211125] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as doc

Re: [RFC] hypercall-vsock: add a new vsock transport

2021-11-25 Thread Gerd Hoffmann
On Thu, Nov 25, 2021 at 08:43:55AM +, Wang, Wei W wrote: > On Thursday, November 25, 2021 2:38 PM, Jason Wang wrote: > > > We thought about virtio-mmio. There are some barriers: > > > 1) It wasn't originally intended for x86 machines. The only machine > > > type in QEMU that supports it (to run

Re: [PATCH v2 net-next 21/26] ice: add XDP and XSK generic per-channel statistics

2021-11-25 Thread Toke Høiland-Jørgensen
Daniel Borkmann writes: > Hi Alexander, > > On 11/23/21 5:39 PM, Alexander Lobakin wrote: > [...] > > Just commenting on ice here as one example (similar applies to other drivers): > >> diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c >> b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c

Re: [PATCH] virtio-mmio: harden interrupt

2021-11-25 Thread kernel test robot
Hi Jason, I love your patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.16-rc2 next-20211125] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as doc

Re: [PATCH] virtio/vsock: fix the transport to work with VMADDR_CID_ANY

2021-11-25 Thread Stefano Garzarella
On Thu, Nov 25, 2021 at 09:27:40AM +, Wang, Wei W wrote: On Thursday, November 25, 2021 3:16 PM, Wang, Wei W wrote: - /* Update CID in case it has changed after a transport reset event */ - vsk->local_addr.svm_cid = dst.svm_cid; - if (space_available) sk->

RE: [PATCH] virtio/vsock: fix the transport to work with VMADDR_CID_ANY

2021-11-25 Thread Wang, Wei W
On Thursday, November 25, 2021 3:16 PM, Wang, Wei W wrote: > - /* Update CID in case it has changed after a transport reset event */ > - vsk->local_addr.svm_cid = dst.svm_cid; > - > if (space_available) > sk->sk_write_space(sk); > Not sure if anybody knows how this aff

RE: [RFC] hypercall-vsock: add a new vsock transport

2021-11-25 Thread Wang, Wei W
On Thursday, November 25, 2021 2:38 PM, Jason Wang wrote: > > We thought about virtio-mmio. There are some barriers: > > 1) It wasn't originally intended for x86 machines. The only machine > > type in QEMU that supports it (to run on x86) is microvm. But > > "microvm" doesn’t support TDX currently,

[PATCH] virtio/vsock: fix the transport to work with VMADDR_CID_ANY

2021-11-25 Thread Wei Wang
The VMADDR_CID_ANY flag used by a socket means that the socket isn't bound to any specific CID. For example, a host vsock server may want to be bound with VMADDR_CID_ANY, so that a guest vsock client can connect to the host server with CID=VMADDR_CID_HOST (i.e. 2), and meanwhile, a host vsock clien

Re: [PATCH net] virtio-net: enable big mode correctly

2021-11-25 Thread Michael S. Tsirkin
On Thu, Nov 25, 2021 at 03:28:31PM +0800, Jason Wang wrote: > On Thu, Nov 25, 2021 at 3:26 PM Michael S. Tsirkin wrote: > > > > On Thu, Nov 25, 2021 at 03:20:07PM +0800, Jason Wang wrote: > > > On Thu, Nov 25, 2021 at 3:15 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Thu, Nov 25, 2021 a