[PATCH vhost] virtio_net: fix the missing of the dma cpu sync

2023-09-26 Thread Xuan Zhuo
Commit 295525e29a5b ("virtio_net: merge dma operations when filling mergeable buffers") unmaps the buffer with DMA_ATTR_SKIP_CPU_SYNC when the dma->ref is zero. We do that with DMA_ATTR_SKIP_CPU_SYNC, because we do not want to do the sync for the entire page_frag. But that misses the sync for the

Re: [PATCH vhost v13 12/12] virtio_net: merge dma operations when filling mergeable buffers

2023-09-26 Thread Xuan Zhuo
On Tue, 26 Sep 2023 12:01:34 -0400, "Michael S. Tsirkin" wrote: > On Thu, Aug 10, 2023 at 08:30:57PM +0800, Xuan Zhuo wrote: > > Currently, the virtio core will perform a dma operation for each > > buffer. Although, the same page may be operated multiple times. > > > > This patch, the driver

Re: [GIT PULL] virtio: features

2023-09-26 Thread Xuan Zhuo
On Tue, 26 Sep 2023 08:04:51 -0500, Michael Roth wrote: > On Sun, Sep 03, 2023 at 06:13:38PM -0400, Michael S. Tsirkin wrote: > > The following changes since commit 2dde18cd1d8fac735875f2e4987f11817cc0bc2c: > > > > Linux 6.5 (2023-08-27 14:49:51 -0700) > > > > are available in the Git

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

2023-09-26 Thread Feng Liu via Virtualization
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: Feng Liu Introduce support for the admin virtqueue. By negotiating VIRTIO_F_ADMIN_VQ feature, driver detects

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

2023-09-26 Thread Feng Liu via Virtualization
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: Feng Liu Currently VQ deletion callback vp_del_vqs() processes generic virtio_device level VQ list instead of VQ

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

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 06:41:58PM +0200, 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 =

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

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 06:20:45PM +0300, Yishai Hadas wrote: > On 21/09/2023 22:58, Alex Williamson wrote: > > On Thu, 21 Sep 2023 15:40:40 +0300 > > Yishai Hadas wrote: > > > > > Introduce a vfio driver over virtio devices to support the legacy > > > interface functionality for VFs. > > > > >

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

2023-09-26 Thread Halil Pasic
[..] > --- 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_akcipher_req->dst_buf = NULL; >

Re: [PATCH V3] io_uring: fix IO hang in io_wq_put_and_exit from do_exit()

2023-09-26 Thread Stefan Hajnoczi
On Tue, Sep 26, 2023 at 09:28:15AM +0800, Ming Lei wrote: > On Mon, Sep 25, 2023 at 05:17:10PM -0400, Stefan Hajnoczi wrote: > > On Fri, Sep 15, 2023 at 03:04:05PM +0800, Jason Wang wrote: > > > On Fri, Sep 8, 2023 at 11:25 PM Ming Lei wrote: > > > > > > > > On Fri, Sep 08, 2023 at 08:44:45AM

Re: [PATCH vhost v13 12/12] virtio_net: merge dma operations when filling mergeable buffers

2023-09-26 Thread Michael S. Tsirkin
On Thu, Aug 10, 2023 at 08:30:57PM +0800, Xuan Zhuo wrote: > Currently, the virtio core will perform a dma operation for each > buffer. Although, the same page may be operated multiple times. > > This patch, the driver does the dma operation and manages the dma > address based the feature

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

2023-09-26 Thread Yishai Hadas via Virtualization
On 21/09/2023 22:58, Alex Williamson wrote: On Thu, 21 Sep 2023 15:40:40 +0300 Yishai Hadas wrote: Introduce a vfio driver over virtio devices to support the legacy interface functionality for VFs. Background, from the virtio spec [1].

Re: [PATCH net-next v1 00/12] vsock/virtio: continue MSG_ZEROCOPY support

2023-09-26 Thread Stefano Garzarella
Hi Arseniy, On Fri, Sep 22, 2023 at 08:24:16AM +0300, Arseniy Krasnov wrote: Hello, this patchset contains second and third parts of another big patchset for MSG_ZEROCOPY flag support: https://lore.kernel.org/netdev/20230701063947.3422088-1-avkras...@sberdevices.ru/ During review of this

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

2023-09-26 Thread Stefano Garzarella
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_test' and has the same set of input arguments as 'vsock_test'. These tests only cover cases of data transmission (no

Re: [PATCH net-next v1 10/12] test/vsock: MSG_ZEROCOPY flag tests

2023-09-26 Thread Stefano Garzarella
On Fri, Sep 22, 2023 at 08:24:26AM +0300, Arseniy Krasnov wrote: This adds three tests for MSG_ZEROCOPY feature: 1) SOCK_STREAM tx with different buffers. 2) SOCK_SEQPACKET tx with different buffers. 3) SOCK_STREAM test to read empty error queue of the socket. Signed-off-by: Arseniy Krasnov

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

2023-09-26 Thread Stefano Garzarella
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 transport is accessible (if transport is not set during setting SO_ZEROCOPY: for example socket is not connected, then

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

2023-09-26 Thread Stefano Garzarella
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 instead of data queue. Possible scenario of error queue usage is receiving completions for transmission with MSG_ZEROCOPY

Re: [PATCH net-next v1 01/12] vsock: fix EPOLLERR set on non-empty error queue

2023-09-26 Thread Stefano Garzarella
On Fri, Sep 22, 2023 at 08:24:17AM +0300, Arseniy Krasnov wrote: If socket's error queue is not empty, EPOLLERR must be set. Otherwise, reader of error queue won't detect data in it using EPOLLERR bit. Currently for AF_VSOCK this is reproducible only with MSG_ZEROCOPY, as this feature is the

Re: [PATCH 00/16] vdpa: Add support for vq descriptor mappings

2023-09-26 Thread Dragos Tatulea via Virtualization
On Tue, 2023-09-26 at 05:22 -0700, Si-Wei Liu wrote: > > > On 9/25/2023 12:59 AM, Dragos Tatulea wrote: > > On Tue, 2023-09-12 at 16:01 +0300, Dragos Tatulea wrote: > > > This patch series adds support for vq descriptor table mappings which > > > are used to improve vdpa live migration downtime.

Re: [PATCH 00/16] vdpa: Add support for vq descriptor mappings

2023-09-26 Thread Si-Wei Liu
On 9/25/2023 12:59 AM, Dragos Tatulea wrote: On Tue, 2023-09-12 at 16:01 +0300, Dragos Tatulea wrote: This patch series adds support for vq descriptor table mappings which are used to improve vdpa live migration downtime. The improvement comes from using smaller mappings which take less time

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

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 10:32:39AM +0800, Jason Wang wrote: > It's the implementation details in legacy. The device needs to make > sure (reset) the driver can work (is done before get_status return). I think that there's no way to make it reliably work for all legacy drivers. They just assumed

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

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 02:14:01PM +0300, Yishai Hadas wrote: > On 22/09/2023 12:54, Michael S. Tsirkin wrote: > > 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. > > >

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

2023-09-26 Thread Michael S. Tsirkin
On Tue, Sep 26, 2023 at 01:51:13PM +0300, Yishai Hadas wrote: > On 21/09/2023 23:34, Michael S. Tsirkin wrote: > > 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. > > >

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

2023-09-26 Thread Yishai Hadas via Virtualization
On 22/09/2023 12:54, Michael S. Tsirkin wrote: 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:

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

2023-09-26 Thread Yishai Hadas via Virtualization
On 21/09/2023 23:34, Michael S. Tsirkin wrote: 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:

Re: [PATCH vfio 08/11] vfio/pci: Expose vfio_pci_core_setup_barmap()

2023-09-26 Thread Yishai Hadas via Virtualization
On 21/09/2023 19:35, Alex Williamson wrote: On Thu, 21 Sep 2023 15:40:37 +0300 Yishai Hadas wrote: Expose vfio_pci_core_setup_barmap() to be used by drivers. This will let drivers to mmap a BAR and re-use it from both vfio and the driver when it's applicable. This API will be used in the

Re: [PATCH 09/16] vdpa/mlx5: Allow creation/deletion of any given mr struct

2023-09-26 Thread Dragos Tatulea via Virtualization
On Tue, 2023-09-26 at 12:44 +0800, Jason Wang wrote: > On Tue, Sep 12, 2023 at 9:02 PM Dragos Tatulea wrote: > > > > This patch adapts the mr creation/deletion code to be able to work with > > any given mr struct pointer. All the APIs are adapted to take an extra > > parameter for the mr. > > >