Re: [PATCH net-next v1 02/12] vsock: read from socket's error queue

2023-09-27 Thread Stefano Garzarella
On Tue, Sep 26, 2023 at 10:36:58PM +0300, Arseniy Krasnov wrote: On 26.09.2023 15:55, Stefano Garzarella wrote: On Fri, Sep 22, 2023 at 08:24:18AM +0300, Arseniy Krasnov wrote: This adds handling of MSG_ERRQUEUE input flag in receive call. This flag is used to read socket's error queue instea

Re: [PATCH net-next v1 08/12] vsock: enable setting SO_ZEROCOPY

2023-09-27 Thread Stefano Garzarella
On Tue, Sep 26, 2023 at 10:38:06PM +0300, Arseniy Krasnov wrote: On 26.09.2023 15:56, Stefano Garzarella wrote: On Fri, Sep 22, 2023 at 08:24:24AM +0300, Arseniy Krasnov wrote: For AF_VSOCK, zerocopy tx mode depends on transport, so this option must be set in AF_VSOCK implementation where tra

Re: [PATCH net-next v1 12/12] test/vsock: io_uring rx/tx tests

2023-09-27 Thread Stefano Garzarella
On Tue, Sep 26, 2023 at 11:00:19PM +0300, Arseniy Krasnov wrote: On 26.09.2023 16:04, Stefano Garzarella wrote: On Fri, Sep 22, 2023 at 08:24:28AM +0300, Arseniy Krasnov wrote: This adds set of tests which use io_uring for rx/tx. This test suite is implemented as separated util like 'vsock_te

RE: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread Gonglei (Arei) via Virtualization
> -Original Message- > From: Halil Pasic [mailto:pa...@linux.ibm.com] > Sent: Wednesday, September 27, 2023 12:42 AM > To: Gonglei (Arei) > Cc: Herbert Xu ; linux-cry...@vger.kernel.org; > Marc Hartmayer ; Michael S. Tsirkin > ; Jason Wang ; > virtualization@lists.linux-foundation.org;

RE: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread Gonglei (Arei) via Virtualization
> -Original Message- > From: Michael S. Tsirkin [mailto:m...@redhat.com] > Sent: Wednesday, September 27, 2023 1:14 AM > To: Halil Pasic > Cc: Gonglei (Arei) ; Herbert Xu > ; linux-cry...@vger.kernel.org; Marc > Hartmayer ; Jason Wang > ; virtualization@lists.linux-foundation.org; > lin

Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread Halil Pasic
On Tue, 26 Sep 2023 13:13:51 -0400 "Michael S. Tsirkin" wrote: > > On the other hand virtio_airq_handler() calls vring_interrupt() with > > interrupts enabled. (While vring_interrupt() is called in a (read) > > critical section in virtio_airq_handler() we use read_lock() and > > not read_lock_irq

Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread Cornelia Huck
On Tue, Sep 26 2023, Halil Pasic wrote: > [..] >> --- a/drivers/crypto/virtio/virtio_crypto_akcipher_algs.c >> +++ b/drivers/crypto/virtio/virtio_crypto_akcipher_algs.c >> @@ -61,8 +61,9 @@ static void virtio_crypto_akcipher_finalize_req( >> vc_akcipher_req->src_buf = NULL; >> vc_akciph

Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread Halil Pasic
On Wed, 27 Sep 2023 12:08:43 +0200 Cornelia Huck wrote: > > On the other hand virtio_airq_handler() calls vring_interrupt() with > > interrupts enabled. (While vring_interrupt() is called in a (read) > > critical section in virtio_airq_handler() we use read_lock() and > > not read_lock_irqsave()

Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread Cornelia Huck
On Wed, Sep 27 2023, Halil Pasic wrote: > On Wed, 27 Sep 2023 12:08:43 +0200 > Cornelia Huck wrote: > >> > On the other hand virtio_airq_handler() calls vring_interrupt() with >> > interrupts enabled. (While vring_interrupt() is called in a (read) >> > critical section in virtio_airq_handler() w

Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread Halil Pasic
On Wed, 27 Sep 2023 14:12:19 +0200 Cornelia Huck wrote: > On Wed, Sep 27 2023, Halil Pasic wrote: > > > On Wed, 27 Sep 2023 12:08:43 +0200 > > Cornelia Huck wrote: > > > >> > On the other hand virtio_airq_handler() calls vring_interrupt() with > >> > interrupts enabled. (While vring_interrup

Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread Halil Pasic
On Wed, 27 Sep 2023 09:24:09 + "Gonglei (Arei)" wrote: > > On a related note, config change callback is also handled incorrectly in > > this > > driver, it takes a mutex from interrupt context. > > Good catch. Will fix it. Thanks Gonglei! Sorry I first misunderstood this as a problem wit

[RESEND PATCH v2] vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE

2023-09-27 Thread Eric Auger
Commit e2ae38cf3d91 ("vhost: fix hung thread due to erroneous iotlb entries") Forbade vhost iotlb msg with null size to prevent entries with size = start = 0 and last = ULONG_MAX to end up in the iotlb. Then commit 95932ab2ea07 ("vhost: allow batching hint without size") only applied the check for

Re: [PATCH 2/2] tools/virtio: Add hints when module is not installed

2023-09-27 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 01:00:20PM +0800, liming...@jaguarmicro.com wrote: > From: Liming Wu > > Need to insmod vhost_test.ko before run virtio_test. > Give some hints to users. > > Signed-off-by: Liming Wu > --- > tools/virtio/virtio_test.c | 4 > 1 file changed, 4 insertions(+) > > dif

Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread Halil Pasic
On Tue, 26 Sep 2023 18:41:58 +0200 Halil Pasic wrote: > > + local_bh_disable(); > > crypto_finalize_akcipher_request(vc_akcipher_req->base.dataq->engine, > > req, err); > > + local_bh_enable(); > > Thanks Gonglei! > > I did this a quick spin, and it does not seem to be sufficient on

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

2023-09-27 Thread Feng Liu via Virtualization
On 2023-09-26 p.m.3:13, Feng Liu via Virtualization wrote: External email: Use caution opening links or attachments On 2023-09-21 a.m.9:46, Michael S. Tsirkin wrote: External email: Use caution opening links or attachments On Thu, Sep 21, 2023 at 03:40:30PM +0300, Yishai Hadas wrote: From

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

2023-09-27 Thread Feng Liu via Virtualization
On 2023-09-26 p.m.3:23, Feng Liu via Virtualization wrote: External email: Use caution opening links or attachments On 2023-09-21 a.m.9:57, Michael S. Tsirkin wrote: External email: Use caution opening links or attachments On Thu, Sep 21, 2023 at 03:40:32PM +0300, Yishai Hadas wrote: From

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

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 02:09:43PM -0400, Feng Liu wrote: > > > On 2023-09-26 p.m.3:13, Feng Liu via Virtualization wrote: > > External email: Use caution opening links or attachments > > > > > > On 2023-09-21 a.m.9:46, Michael S. Tsirkin wrote: > > > External email: Use caution opening links o

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

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 02:12:24PM -0400, Feng Liu wrote: > > > On 2023-09-26 p.m.3:23, Feng Liu via Virtualization wrote: > > External email: Use caution opening links or attachments > > > > > > On 2023-09-21 a.m.9:57, Michael S. Tsirkin wrote: > > > External email: Use caution opening links o

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

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 10:18:17AM -0300, Jason Gunthorpe wrote: > On Tue, Sep 26, 2023 at 07:41:44AM -0400, Michael S. Tsirkin wrote: > > > > By the way, this follows what was done already between vfio/mlx5 to > > > mlx5_core modules where mlx5_core exposes generic APIs to execute a > > > comman

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

2023-09-27 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 10:50:57AM -0300, Jason Gunthorpe wrote: > On Tue, Sep 26, 2023 at 01:42:52AM -0400, Michael S. Tsirkin wrote: > > On Mon, Sep 25, 2023 at 09:40:59PM -0300, Jason Gunthorpe wrote: > > > On Mon, Sep 25, 2023 at 03:44:11PM -0400, Michael S. Tsirkin wrote: > > > > > VDPA is ver

Re: Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread zhenwei pi via Virtualization
Hi Michael & Lei, I volunteer to fix this by workqueue. I also notice that device drivers use workqueue to handle config-changed again and again, what about re-implement __virtio_config_changed() by kicking workqueue instead? By the way, balloon dirvers uses spin_lock_irqsave/spin_unlock_ir

RE: Re: [PATCH] crypto: virtio-crypto: call finalize with bh disabled

2023-09-27 Thread Gonglei (Arei) via Virtualization
> -Original Message- > From: zhenwei pi [mailto:pizhen...@bytedance.com] > Sent: Thursday, September 28, 2023 9:24 AM > To: Michael S. Tsirkin ; Gonglei (Arei) > > Cc: Halil Pasic ; Herbert Xu > ; linux-cry...@vger.kernel.org; Marc > Hartmayer ; Jason Wang > ; virtualization@lists.linux

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

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 08:16:00PM -0300, Jason Gunthorpe wrote: > On Wed, Sep 27, 2023 at 05:30:04PM -0400, Michael S. Tsirkin wrote: > > On Wed, Sep 27, 2023 at 10:18:17AM -0300, Jason Gunthorpe wrote: > > > On Tue, Sep 26, 2023 at 07:41:44AM -0400, Michael S. Tsirkin wrote: > > > > > > > > By t

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

2023-09-27 Thread Michael S. Tsirkin
On Wed, Sep 27, 2023 at 08:20:05PM -0300, Jason Gunthorpe wrote: > On Wed, Sep 27, 2023 at 05:38:55PM -0400, Michael S. Tsirkin wrote: > > On Tue, Sep 26, 2023 at 10:50:57AM -0300, Jason Gunthorpe wrote: > > > On Tue, Sep 26, 2023 at 01:42:52AM -0400, Michael S. Tsirkin wrote: > > > > On Mon, Sep 2