Re: [PATCH 08/16] vdpa/mlx5: Rename mr destroy functions

2023-09-25 Thread Jason Wang
On Tue, Sep 12, 2023 at 9:02 PM Dragos Tatulea wrote: > > Make mlx5_destroy_mr symmetric to mlx5_create_mr. > > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 4 ++-- > drivers/vdpa/mlx5/core/mr.c| 6 +

Re: [PATCH 07/16] vdpa/mlx5: Collapse "dvq" mr add/delete functions

2023-09-25 Thread Jason Wang
hes. > > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/core/mr.c | 16 +--- > 1 file changed, 5 insertions(+), 11 deletions(-) > > diff --git a/drivers/vdpa/mlx5/core/mr.c b/drivers/vdpa/mlx5/core/mr.c > index 587300e

Re: [PATCH 06/16] vdpa/mlx5: Take cvq iotlb lock during refresh

2023-09-25 Thread Jason Wang
s://lore.kernel.org/lkml/20230112142218.725622-4-epere...@redhat.com/ > > Suggested-by: Eugenio Pérez > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/core/mr.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/v

Re: [PATCH 05/16] vdpa/mlx5: Decouple cvq iotlb handling from hw mapping code

2023-09-25 Thread Jason Wang
unsigned int asid) > +{ > + if (mvdev->group2asid[MLX5_VDPA_CVQ_GROUP] != asid) > + return 0; > + > + prune_iotlb(mvdev); > + return dup_iotlb(mvdev, iotlb); > +} > + > int mlx5_vdpa_create_dma_mr(struct mlx5_vdpa_dev *mvdev) > { &g

Re: [PATCH 04/16] vdpa/mlx5: Create helper function for dma mappings

2023-09-25 Thread Jason Wang
On Tue, Sep 12, 2023 at 9:02 PM Dragos Tatulea wrote: > > Necessary for upcoming cvq separation from mr allocation. > > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1 + > drivers/vdpa/mlx5/core/mr.c| 5

Re: [PATCH] vringh: don't use vringh_kiov_advance() in vringh_iov_xfer()

2023-09-25 Thread Jason Wang
quot;vringh: implement vringh_kiov_advance()") > Cc: sta...@vger.kernel.org > Reported-by: Jason Wang > Signed-off-by: Stefano Garzarella Acked-by: Jason Wang Thanks > --- > drivers/vhost/vringh.c | 12 +++- > 1 file changed, 11 insertions(+), 1 deletion(-

Re: [RFC 3/7] vhost: Add 3 new uapi to support iommufd

2023-09-25 Thread Jason Wang
On Sun, Sep 24, 2023 at 1:05 AM Cindy Lu wrote: > > VHOST_VDPA_SET_IOMMU_FD: bind the device to iommufd device > > VDPA_DEVICE_ATTACH_IOMMUFD_AS: Attach a vdpa device to an iommufd > address space specified by IOAS id. > > VDPA_DEVICE_DETACH_IOMMUFD_AS: Detach a vdpa device > from the iommufd

Re: [RFC 1/7] vhost/iommufd: Add the functions support iommufd

2023-09-25 Thread Jason Wang
On Sun, Sep 24, 2023 at 1:05 AM Cindy Lu wrote: > > Add a new file vhost/iommufd.c to support the function of > iommufd, This file contains iommufd function of emulated device and > the physical device. > > Signed-off-by: Cindy Lu > --- > drivers/vhost/iommufd.c | 151

Re: [RFC 5/7] vdpa: Add new vdpa_config_ops

2023-09-25 Thread Jason Wang
On Sun, Sep 24, 2023 at 1:06 AM Cindy Lu wrote: > > Add new vdpa_config_ops to support iommufd > > Signed-off-by: Cindy Lu > --- > include/linux/vdpa.h | 34 +- > 1 file changed, 33 insertions(+), 1 deletion(-) > > diff --git a/include/linux/vdpa.h

Re: [RFC 0/7] vdpa: Add support for iommufd

2023-09-25 Thread Jason Wang
On Sun, Sep 24, 2023 at 1:05 AM Cindy Lu wrote: > > Hi All > Really apologize for the delay, this is the draft RFC for > iommufd support for vdpa, This code provides the basic function > for iommufd support > > The code was tested and passed in device vdpa_sim_net > The qemu code is >

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

2023-09-25 Thread Jason Wang
On Mon, Sep 25, 2023 at 4:26 PM Parav Pandit wrote: > > > > > From: Jason Wang > > Sent: Monday, September 25, 2023 8:00 AM > > > > On Fri, Sep 22, 2023 at 8:25 PM Parav Pandit wrote: > > > > > > > > > > From: Ja

Re: [RFC v2 4/4] vduse: Add new ioctl VDUSE_GET_RECONNECT_INFO

2023-09-24 Thread Jason Wang
On Thu, Sep 21, 2023 at 10:07 PM Cindy Lu wrote: > > On Mon, Sep 18, 2023 at 4:49 PM Jason Wang wrote: > > > > On Tue, Sep 12, 2023 at 11:01 AM Cindy Lu wrote: > > > > > > In VDUSE_GET_RECONNECT_INFO, the Userspace App can get the map size > > >

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

2023-09-24 Thread Jason Wang
On Fri, Sep 22, 2023 at 8:11 PM Jason Gunthorpe wrote: > > On Fri, Sep 22, 2023 at 11:01:23AM +0800, Jason Wang wrote: > > > > Even when it does, there is no real use case to live migrate a > > > virtio-net function from, say, AWS to GCP. > > > > It

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

2023-09-24 Thread Jason Wang
On Fri, Sep 22, 2023 at 8:25 PM Parav Pandit wrote: > > > > From: Jason Gunthorpe > > Sent: Friday, September 22, 2023 5:53 PM > > > > > And what's more, using MMIO BAR0 then it can work for legacy. > > > > Oh? How? Our team didn't think so. > > It does not. It was already discussed. > The

Re: [PATCH net 5/6] virtio-net: fix the vq coalescing setting for vq resize

2023-09-24 Thread Jason Wang
On Fri, Sep 22, 2023 at 5:56 PM Xuan Zhuo wrote: > > On Fri, 22 Sep 2023 15:32:39 +0800, Jason Wang wrote: > > On Fri, Sep 22, 2023 at 1:02 PM Heng Qi wrote: > > > > > > > > > > > > 在 2023/9/22 下午12:29, Jason Wang 写道: > > >

Re: [PATCH net 5/6] virtio-net: fix the vq coalescing setting for vq resize

2023-09-24 Thread Jason Wang
On Fri, Sep 22, 2023 at 3:58 PM Heng Qi wrote: > > > > 在 2023/9/22 下午3:32, Jason Wang 写道: > > On Fri, Sep 22, 2023 at 1:02 PM Heng Qi wrote: > >> > >> > >> 在 2023/9/22 下午12:29, Jason Wang 写道: > >>> On Tue, Sep 19, 2023 at 3:49 PM Heng Q

Re: [PATCH net 5/6] virtio-net: fix the vq coalescing setting for vq resize

2023-09-22 Thread Jason Wang
On Fri, Sep 22, 2023 at 1:02 PM Heng Qi wrote: > > > > 在 2023/9/22 下午12:29, Jason Wang 写道: > > On Tue, Sep 19, 2023 at 3:49 PM Heng Qi wrote: > >> According to the definition of virtqueue coalescing spec[1]: > >> > >>Upon disabling and re-enabl

Re: [PATCH net 6/6] virtio-net: a tiny comment update

2023-09-21 Thread Jason Wang
On Tue, Sep 19, 2023 at 3:49 PM Heng Qi wrote: > > Update a comment because virtio-net now supports both > VIRTIO_NET_F_NOTF_COAL and VIRTIO_NET_F_VQ_NOTF_COAL. > > Signed-off-by: Heng Qi Acked-by: Jason Wang Thanks > --- > drivers/net/virtio_net.c | 2 +- > 1 f

Re: [PATCH net 5/6] virtio-net: fix the vq coalescing setting for vq resize

2023-09-21 Thread Jason Wang
On Tue, Sep 19, 2023 at 3:49 PM Heng Qi wrote: > > According to the definition of virtqueue coalescing spec[1]: > > Upon disabling and re-enabling a transmit virtqueue, the device MUST set > the coalescing parameters of the virtqueue to those configured through the >

Re: [PATCH net 4/6] virtio-net: fix per queue coalescing parameter setting

2023-09-21 Thread Jason Wang
On Tue, Sep 19, 2023 at 3:49 PM Heng Qi wrote: > > When the user sets a non-zero coalescing parameter to 0 for a specific > virtqueue, it does not work as expected, so let's fix this. > > Fixes: 394bd87764b6 ("virtio_net: support per queue interrupt coalesce > command") > Reported-by: Xiaoming

Re: [PATCH net 3/6] virtio-net: consistently save parameters for per-queue

2023-09-21 Thread Jason Wang
t;) > Cc: Gavin Li > Signed-off-by: Heng Qi Acked-by: Jason Wang Thanks > --- > drivers/net/virtio_net.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 80d35a864790..ce60162d380a 100644

Re: [PATCH net 2/6] virtio-net: fix mismatch of getting tx-frames

2023-09-21 Thread Jason Wang
gt; Signed-off-by: Heng Qi Acked-by: Jason Wang Thanks > --- > drivers/net/virtio_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index fd5bc8d59eda..80d35a864790 100644 > --- a/drivers/net/vir

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

2023-09-21 Thread Jason Wang
On Fri, Sep 22, 2023 at 3:53 AM Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 03:34:03PM -0400, Michael S. Tsirkin wrote: > > > that's easy/practical. If instead VDPA gives the same speed with just > > shadow vq then keeping this hack in vfio seems like less of a problem. > > Finally if

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

2023-09-21 Thread Jason Wang
On Fri, Sep 22, 2023 at 6:55 AM Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 04:45:45PM -0400, Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 04:49:46PM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 03:13:10PM -0400, Michael S. Tsirkin wrote: > > > > On Thu, Sep 21,

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

2023-09-21 Thread Jason Wang
On Fri, Sep 22, 2023 at 4:16 AM Michael S. Tsirkin wrote: > > On Thu, Sep 21, 2023 at 04:53:45PM -0300, Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 03:34:03PM -0400, Michael S. Tsirkin wrote: > > > > > that's easy/practical. If instead VDPA gives the same speed with just > > > shadow vq

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

2023-09-21 Thread Jason Wang
On Fri, Sep 22, 2023 at 3:49 AM Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 03:13:10PM -0400, Michael S. Tsirkin wrote: > > 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,

Re: [PATCH net 1/6] virtio-net: initially change the value of tx-frames

2023-09-21 Thread Jason Wang
tching > condition is met. > +* 3. If the device is up, the user setting fails: > +* "netlink error: Device or resource busy" > +* This is not intuitive. Therefore, we keep napi_tx state > consistent with > +

Re: [RFC v2 4/4] vduse: Add new ioctl VDUSE_GET_RECONNECT_INFO

2023-09-18 Thread Jason Wang
On Tue, Sep 12, 2023 at 11:01 AM Cindy Lu wrote: > > In VDUSE_GET_RECONNECT_INFO, the Userspace App can get the map size > and The number of mapping memory pages from the kernel. The userspace > App can use this information to map the pages. > > Signed-off-by: Cindy Lu > --- >

Re: [RFC v2 2/4] vduse: Add file operation for mmap

2023-09-18 Thread Jason Wang
On Tue, Sep 12, 2023 at 11:00 AM Cindy Lu wrote: > > Add the operation for mmap, The user space APP will > use this function to map the pages to userspace > > Signed-off-by: Cindy Lu > --- > drivers/vdpa/vdpa_user/vduse_dev.c | 63 ++ > 1 file changed, 63

Re: [RFC v2 1/4] vduse: Add function to get/free the pages for reconnection

2023-09-18 Thread Jason Wang
On Tue, Sep 12, 2023 at 11:00 AM Cindy Lu wrote: > > Add the function vduse_alloc_reconnnect_info_mem > and vduse_alloc_reconnnect_info_mem > In this 2 function, vduse will get/free (vq_num + 1)*page > Page 0 will be used to save the reconnection information, The > Userspace App will maintain

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

2023-09-15 Thread Jason Wang
On Fri, Sep 8, 2023 at 11:25 PM Ming Lei wrote: > > On Fri, Sep 08, 2023 at 08:44:45AM -0600, Jens Axboe wrote: > > On 9/8/23 8:34 AM, Ming Lei wrote: > > > On Fri, Sep 08, 2023 at 07:49:53AM -0600, Jens Axboe wrote: > > >> On 9/8/23 3:30 AM, Ming Lei wrote: > > >>> diff --git

Re: [PATCH v2] vdpa/mlx5: Fix firmware error on creation of 1k VQs

2023-09-15 Thread Jason Wang
b377aa21 ("vdpa/mlx5: Add VDPA driver for supported mlx5 devices") > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 63 ++- > drivers/vdpa/mlx5/net/mlx5_vnet.h | 9 + > 2 files chan

Re: [PATCH] vdpa/mlx5: Fix double release of debugfs entry

2023-09-15 Thread Jason Wang
driver") > Signed-off-by: Dragos Tatulea > Reviewed-by: Gal Pressman Acked-by: Jason Wang Thanks > --- > drivers/vdpa/mlx5/net/debug.c | 5 +++-- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 7 ++- > drivers/vdpa/mlx5/net/mlx5_vnet.h | 2 +- > 3 files changed, 6 insertions(

Re: [RFC v2 3/4] vduse: update the vq_info in ioctl

2023-09-12 Thread Jason Wang
On Tue, Sep 12, 2023 at 11:00 AM Cindy Lu wrote: > > In VDUSE_VQ_GET_INFO, the driver will sync the last_avail_idx > with reconnect info, After mapping the reconnect pages to userspace > The userspace App will update the reconnect_time in > struct vhost_reconnect_vring, If this is not 0 then it

Re: [PATCH RFC v3 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-09-12 Thread Jason Wang
On Tue, Sep 12, 2023 at 8:28 AM Si-Wei Liu wrote: > > > > On 9/10/2023 8:52 PM, Jason Wang wrote: > > On Sat, Sep 9, 2023 at 9:46 PM Si-Wei Liu wrote: > >> Userspace needs this feature flag to distinguish if vhost-vdpa > >> iotlb in the kernel supports persist

Re: [PATCH RFC v3 2/4] vdpa/mlx5: implement .reset_map driver op

2023-09-12 Thread Jason Wang
On Tue, Sep 12, 2023 at 8:02 AM Si-Wei Liu wrote: > > > > On 9/10/2023 8:48 PM, Jason Wang wrote: > > On Sat, Sep 9, 2023 at 9:46 PM Si-Wei Liu wrote: > >> Today, mlx5_vdpa gets started by preallocate 1:1 DMA mapping at > >> device creation time, while

Re: [PATCH RFC v2 1/4] vdpa: introduce .reset_map operation callback

2023-09-12 Thread Jason Wang
On Tue, Sep 12, 2023 at 7:31 AM Si-Wei Liu wrote: > > Hi Jason, > > On 9/10/2023 8:42 PM, Jason Wang wrote: > > Hi Si-Wei: > > > > On Sat, Sep 9, 2023 at 9:34 PM Si-Wei Liu wrote: > >> On-chip IOMMU parent driver could use it to restore memory mapping >

Re: [PATCH RFC v2 0/3] vdpa: dedicated descriptor table group

2023-09-11 Thread Jason Wang
On Mon, Sep 11, 2023 at 3:06 PM Dragos Tatulea wrote: > > Hi Jason, > > On Mon, 2023-09-11 at 14:43 +0800, Jason Wang wrote: > > On Sat, Sep 9, 2023 at 4:45 PM Si-Wei Liu wrote: > > > > > > Following patchset introduces dedicated group for descriptor table to

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

2023-09-11 Thread Jason Wang
annon Nelson > Acked-by: Eugenio Pérez Acked-by: Jason Wang Thanks > --- > include/linux/virtio_pci_modern.h | 34 --- > 1 file changed, 22 insertions(+), 12 deletions(-) > > diff --git a/include/linux/virtio_pci_modern.h > b/include/linu

Re: [PATCH iproute2] vdpa: consume device_features parameter

2023-09-11 Thread Jason Wang
mac 00:11:22:33:44:55 > Unknown option "0xdeadbeef" > > Fixes: a4442ce58ebb ("vdpa: allow provisioning device features") > Signed-off-by: Allen Hubbe > Reviewed-by: Shannon Nelson > Reviewed-by: Si-Wei Liu Acked-by: Jason Wang Thanks > --- > vdp

Re: [PATCH 0/2] vdpa: Add logging operatins

2023-09-11 Thread Jason Wang
Adding Eugenio and Si Wei. On Sat, Aug 26, 2023 at 9:24 AM Jiang Dongxu wrote: > > From: jiangdongxu > > Currently, the vdpa device supports suspend and resume operations. > To support vdpa device live migration, we need to support logging > operations and device state save/load opertions. > >

Re: [PATCH RFC v2 0/3] vdpa: dedicated descriptor table group

2023-09-11 Thread Jason Wang
On Sat, Sep 9, 2023 at 4:45 PM Si-Wei Liu wrote: > > Following patchset introduces dedicated group for descriptor table to > reduce live migration downtime when passthrough VQ is being switched > to shadow VQ. This RFC v2 is sent to incorporate the early feedback > from reviewers on the uAPI and

Re: [PATCH RFC v3 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-09-10 Thread Jason Wang
On Sat, Sep 9, 2023 at 9:46 PM Si-Wei Liu wrote: > > Userspace needs this feature flag to distinguish if vhost-vdpa > iotlb in the kernel supports persistent IOTLB mapping across > device reset. As discussed, the IOTLB persists for devices with platform IOMMU at least. You've mentioned that this

Re: [PATCH RFC v3 2/4] vdpa/mlx5: implement .reset_map driver op

2023-09-10 Thread Jason Wang
On Sat, Sep 9, 2023 at 9:46 PM Si-Wei Liu wrote: > > Today, mlx5_vdpa gets started by preallocate 1:1 DMA mapping at > device creation time, while this 1:1 mapping will be implicitly > destroyed when the first .set_map call is invoked. Everytime > when the .reset callback is invoked, any mapping

Re: [PATCH RFC v2 1/4] vdpa: introduce .reset_map operation callback

2023-09-10 Thread Jason Wang
Hi Si-Wei: On Sat, Sep 9, 2023 at 9:34 PM Si-Wei Liu wrote: > > On-chip IOMMU parent driver could use it to restore memory mapping > to the initial state. As discussed before. On-chip IOMMU is the hardware details that need to be hidden by the vDPA bus. Exposing this will complicate the

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

2023-08-23 Thread Jason Wang
l size. vhost_iotlb_del_range() will compute a correct end > iova. Same for vhost_vdpa_iotlb_unmap(). > > Signed-off-by: Eric Auger Cc: sta...@vger.kernel.org I think we need to document the usage of 0 as msg.size for IOTLB_INVALIDATE in uapi. Other than this: Acked-by: Jason Wang Tha

Re: [PATCH net-next v3] virtio_net: Introduce skb_vnet_common_hdr to avoid typecasting

2023-08-22 Thread Jason Wang
instead of the UAPI header. > > v2->v3 > feedback from Willem de Bruijn > 1. fix typo in commit message. > 2. add original struct virtio_net_hdr into union > 3. remove virtio_net_hdr_mrg_rxbuf variable in receive_buf; > > Signed-off-by: Feng Liu > Reviewed-by: Ji

Re: [PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-08-22 Thread Jason Wang
On Thu, Aug 17, 2023 at 7:44 AM Si-Wei Liu wrote: > > > > On 8/15/2023 6:48 PM, Jason Wang wrote: > > On Wed, Aug 16, 2023 at 6:31 AM Si-Wei Liu wrote: > >> > >> > >> On 8/14/2023 7:25 PM, Jason Wang wrote: > >>> On Tue, Aug 15, 2023 at 9:

Re: [PATCH] vdpa: Update sysfs ABI documentation

2023-08-20 Thread Jason Wang
On Mon, Aug 21, 2023 at 9:16 AM Shawn.Shao wrote: > > Fix the wrong drivers_autoprobe path name in the document > > Signed-off-by: Shawn.Shao Acked-by: Jason Wang Thanks > --- > Documentation/ABI/testing/sysfs-bus-vdpa | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [PATCH] vdpa_sim_blk: Fix the potential leak of mgmt_dev

2023-08-20 Thread Jason Wang
On Mon, Aug 21, 2023 at 10:18 AM Shawn.Shao wrote: > > If the shared_buffer allocation fails, need to unregister mgmt_dev first. > Please add a Fixes tag. Other than this Acked-by: Jason Wang Thanks > Signed-off-by: Shawn.Shao > --- > drivers/vdpa/vdpa_sim/vdpa_sim_bl

Re: [PATCH] MAINTAINERS: Add myself as mlx5_vdpa driver

2023-08-15 Thread Jason Wang
On Tue, Aug 15, 2023 at 4:33 PM Dragos Tatulea wrote: > > As Eli Cohen moved to other work, I'll be the contact point for > mlx5_vdpa. > > Signed-off-by: Dragos Tatulea Acked-by: Jason Wang Thanks > --- > MAINTAINERS | 6 ++ > 1 file changed, 6 insertions(+) >

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

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 10:24 AM Xuan Zhuo wrote: > > On Wed, 16 Aug 2023 10:19:34 +0800, Jason Wang wrote: > > On Wed, Aug 16, 2023 at 10:16 AM Xuan Zhuo > > wrote: > > > > > > On Wed, 16 Aug 2023 09:13:48 +0800, Jason Wang > > > wrote: >

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

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 10:16 AM Xuan Zhuo wrote: > > On Wed, 16 Aug 2023 09:13:48 +0800, Jason Wang wrote: > > On Tue, Aug 15, 2023 at 5:40 PM Xuan Zhuo > > wrote: > > > > > > On Tue, 15 Aug 2023 15:50:23 +0800, Jason Wang > > > wrote: >

Re: [PATCH RFC 2/3] vhost-vdpa: introduce descriptor group backend feature

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 7:54 AM Si-Wei Liu wrote: > > > > On 8/9/2023 8:49 PM, Jason Wang wrote: > > On Wed, Aug 9, 2023 at 8:56 PM Si-Wei Liu wrote: > >> Userspace knows if the device has dedicated descriptor group or not > >> by checking this feat

Re: [PATCH RFC 1/4] vdpa: introduce .reset_map operation callback

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 3:49 AM Si-Wei Liu wrote: > > > > On 8/14/2023 7:21 PM, Jason Wang wrote: > > On Tue, Aug 15, 2023 at 9:46 AM Si-Wei Liu wrote: > >> Signed-off-by: Si-Wei Liu > >> --- > >> include/linux/vdpa.h | 7 +++ > >>

Re: [PATCH RFC 0/3] vdpa: dedicated descriptor table group

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 8:02 AM Si-Wei Liu wrote: > > > > On 8/9/2023 8:50 PM, Jason Wang wrote: > > On Wed, Aug 9, 2023 at 8:56 PM Si-Wei Liu wrote: > >> Following patchset introduces dedicated group for descriptor table to > >> reduce live migration d

Re: [PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-08-15 Thread Jason Wang
On Wed, Aug 16, 2023 at 6:31 AM Si-Wei Liu wrote: > > > > On 8/14/2023 7:25 PM, Jason Wang wrote: > > On Tue, Aug 15, 2023 at 9:45 AM Si-Wei Liu wrote: > >> Signed-off-by: Si-Wei Liu > >> --- > >> drivers/vhost/vdpa.c | 16 +++

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

2023-08-15 Thread Jason Wang
On Tue, Aug 15, 2023 at 5:40 PM Xuan Zhuo wrote: > > On Tue, 15 Aug 2023 15:50:23 +0800, Jason Wang wrote: > > On Tue, Aug 15, 2023 at 2:32 PM Xuan Zhuo > > wrote: > > > > > > > > > Hi, Jason > > > > > > Could you sk

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

2023-08-15 Thread Jason Wang
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 soon, and won't have time to do this until next week. But I spot two possible "issues":

Re: [PATCH RFC 3/4] vhost-vdpa: should restore 1:1 dma mapping before detaching driver

2023-08-14 Thread Jason Wang
On Tue, Aug 15, 2023 at 9:45 AM Si-Wei Liu wrote: > > Signed-off-by: Si-Wei Liu > --- > drivers/vhost/vdpa.c | 17 + > 1 file changed, 17 insertions(+) > > diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c > index b43e868..62b0a01 100644 > --- a/drivers/vhost/vdpa.c > +++

Re: [PATCH RFC 4/4] vhost-vdpa: introduce IOTLB_PERSIST backend feature bit

2023-08-14 Thread Jason Wang
On Tue, Aug 15, 2023 at 9:45 AM Si-Wei Liu wrote: > > Signed-off-by: Si-Wei Liu > --- > drivers/vhost/vdpa.c | 16 +++- > include/uapi/linux/vhost_types.h | 2 ++ > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/drivers/vhost/vdpa.c

Re: [PATCH RFC 1/4] vdpa: introduce .reset_map operation callback

2023-08-14 Thread Jason Wang
On Tue, Aug 15, 2023 at 9:46 AM Si-Wei Liu wrote: > > Signed-off-by: Si-Wei Liu > --- > include/linux/vdpa.h | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/include/linux/vdpa.h b/include/linux/vdpa.h > index db1b0ea..3a3878d 100644 > --- a/include/linux/vdpa.h > +++

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-14 Thread Jason Wang
On Mon, Aug 14, 2023 at 10:15 PM Dragos Tatulea wrote: > > On Wed, 2023-08-09 at 09:42 +0800, Jason Wang wrote: > > On Tue, Aug 8, 2023 at 3:24 PM Dragos Tatulea wrote: > > > > > > On Tue, 2023-08-08 at 10:57 +0800, Jason Wang wrote: > > > > On

Re: [PATCH net-next 0/8] virtio-net: support dynamic notification coalescing moderation

2023-08-13 Thread Jason Wang
On Fri, Aug 11, 2023 at 2:55 PM Heng Qi wrote: > > Now, virtio-net already supports per-queue notification coalescing parameter > setting. Based on this, we use the netdim library[1] of linux to support > dynamic notification coalescing moderation for virtio-net. > > [1]

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

2023-08-13 Thread Jason Wang
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. The purpose is to keep memory > mapped across multiple add/get buf operations. > > Signed-off-by: Xuan Zhuo > Acke

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-13 Thread Jason Wang
On Fri, Aug 11, 2023 at 6:21 AM Si-Wei Liu wrote: > > > > On 8/9/2023 8:10 PM, Jason Wang wrote: > > On Thu, Aug 10, 2023 at 8:40 AM Si-Wei Liu wrote: > >> > >> > >> On 8/8/2023 11:52 PM, Jason Wang wrote: > >>> On Wed, Aug 9, 2023 at 6:5

Re: [PATCH] virtio_vdpa: build affinity masks conditionally

2023-08-11 Thread Jason Wang
On Fri, Aug 11, 2023 at 5:48 PM Michael S. Tsirkin wrote: > > 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: > &g

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

2023-08-11 Thread Jason Wang
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: > > > > > > On Fri, Aug 11, 2023 at 05:18:51PM +0800, Jason Wang wrote: > >

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

2023-08-11 Thread Jason Wang
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: > > > > > > On Fri, Aug 11, 2023 at 10:23:15AM +0800, Jason Wang wrote: > >

Re: [PATCH] virtio_vdpa: build affinity masks conditionally

2023-08-11 Thread Jason Wang
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() > > unconditionally which may lead several issues: > > > > - the affinity mask

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

2023-08-11 Thread Jason Wang
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: > > > > > > On Tue, Aug 08, 2023 at 10:30:56AM +0800, Jason Wang wrote: > >

[PATCH] virtio_vdpa: build affinity masks conditionally

2023-08-11 Thread Jason Wang
"virtio-vdpa: Support interrupt affinity spreading mechanism") Signed-off-by: Jason Wang --- drivers/virtio/virtio_vdpa.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/virtio/virtio_vdpa.c b/drivers/virtio/virtio_vdpa.c index 961161da590

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

2023-08-10 Thread Jason Wang
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: > > > > > > On Thu, Jul 27, 2023 at 5:46 PM Michael S. Tsirkin > > > wrote: >

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

2023-08-10 Thread Jason Wang
On Fri, Aug 11, 2023 at 3:45 AM Michael S. Tsirkin wrote: > > 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.

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

2023-08-10 Thread Jason Wang
we doing with this patchset? If we are merging anything > for this release it has to happen now. I think we can merge this and do optimization on top. Acked-by: Jason Wang Thanks > > > Dragos Tatulea (1): > > vdpa/mlx5: Fix mr->initialized semantics > > > > Eu

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

2023-08-10 Thread Jason Wang
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? Thanks > > Thanks. > ___ Virtualization

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

2023-08-09 Thread Jason Wang
which corresponds to the > `reserved` field in struct virtio_net_hash_config, is not zeroed, > thereby violating the VirtIO standard. > > This patch solves this problem by zeroing this field in > virtnet_init_default_rss(). > > Sig

Re: [PATCH RFC 0/3] vdpa: dedicated descriptor table group

2023-08-09 Thread Jason Wang
On Wed, Aug 9, 2023 at 8:56 PM Si-Wei Liu wrote: > > Following patchset introduces dedicated group for descriptor table to > reduce live migration downtime when passthrough VQ is being switched > to shadow VQ. As this RFC set is to seek early feedback on the uAPI > and driver API part, for now

Re: [PATCH RFC 2/3] vhost-vdpa: introduce descriptor group backend feature

2023-08-09 Thread Jason Wang
On Wed, Aug 9, 2023 at 8:56 PM Si-Wei Liu wrote: > > Userspace knows if the device has dedicated descriptor group or not > by checking this feature bit. > > It's only exposed if the vdpa driver backend implements the > .get_vq_desc_group() operation callback. Userspace trying to negotiate > this

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

2023-08-09 Thread Jason Wang
rtnl needs to be held for userspace requests to change the number of queues. So we are serialized in this way. Fixes: 25266128fe16 ("virtio-net: fix race between set queues and probe") Reported-by: Dragos Tatulea Acked-by: Michael S. Tsirkin Signed-off-by: Jason Wang --- The patch is needed

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

2023-08-09 Thread Jason Wang
On Wed, Aug 9, 2023 at 2:51 PM Michael S. Tsirkin wrote: > > 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: > > > >

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-09 Thread Jason Wang
On Thu, Aug 10, 2023 at 8:40 AM Si-Wei Liu wrote: > > > > On 8/8/2023 11:52 PM, Jason Wang wrote: > > On Wed, Aug 9, 2023 at 6:58 AM Si-Wei Liu wrote: > >> > >> > >> On 8/7/2023 8:00 PM, Jason Wang wrote: > >>> On Fri, Aug 4, 2023 at 1:5

Re: Unbinding virtio_pci_modern does not release BAR4 in Linux 6.5.0-rc4

2023-08-09 Thread Jason Wang
On Thu, Aug 3, 2023 at 10:37 PM Stefan Hajnoczi wrote: > > Hi, > After running "driverctl --nosave set-override :01:00.0 vfio-pci" on > a virtio-blk-pci device, /proc/iomem shows that BAR4 is still owned by > virtio_pci_modern even though the vfio-pci driver is now bound to the > PCI device.

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-09 Thread Jason Wang
On Wed, Aug 9, 2023 at 6:58 AM Si-Wei Liu wrote: > > > > On 8/7/2023 8:00 PM, Jason Wang wrote: > > On Fri, Aug 4, 2023 at 1:58 AM Si-Wei Liu wrote: > >> > >> > >> On 8/3/2023 1:03 AM, Jason Wang wrote: > >>> On Thu, Aug 3, 2023 at 1:13 

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

2023-08-09 Thread Jason Wang
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 queues and probe by calling > > _vir

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

2023-08-08 Thread Jason Wang
6 ("virtio-net: fix race between set queues and probe") Reported-by: Dragos Tatulea Signed-off-by: Jason Wang --- The patch is needed for -stable. --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/ne

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

2023-08-08 Thread Jason Wang
On Tue, Aug 8, 2023 at 7:35 PM Dragos Tatulea wrote: > > On Tue, 2023-07-25 at 03:20 -0400, Jason Wang wrote: > > A race were found where set_channels could be called after registering > > but before virtnet_set_queues() in virtnet_probe(). Fixing this by > > movin

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-08 Thread Jason Wang
On Tue, Aug 8, 2023 at 3:24 PM Dragos Tatulea wrote: > > On Tue, 2023-08-08 at 10:57 +0800, Jason Wang wrote: > > On Thu, Aug 3, 2023 at 7:40 PM Dragos Tatulea wrote: > > > > > > On Thu, 2023-08-03 at 16:03 +0800, Jason Wang wrote: > > > > On

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-08 Thread Jason Wang
nks > > > Best regards > > > > On Tue, Aug 8, 2023 at 2:43 PM 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

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-08 Thread Jason Wang
On Tue, Aug 8, 2023 at 1:59 PM Michael S. Tsirkin wrote: > > 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 > >

Re: [PATCH] virtio_ring: fix avail_wrap_counter in virtqueue_add_packed

2023-08-07 Thread Jason Wang
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; total_sg == vq->packed.vring.num. > > Let’s assume the following

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

2023-08-07 Thread Jason Wang
On Tue, Aug 8, 2023 at 11:57 AM Xuan Zhuo wrote: > > On Tue, 8 Aug 2023 11:49:08 +0800, Jason Wang wrote: > > On Tue, Aug 8, 2023 at 11:12 AM Xuan Zhuo > > wrote: > > > > > > On Tue, 8 Aug 2023 11:08:09 +0800, Jason Wang wrote: > > > > On Tue, A

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

2023-08-07 Thread Jason Wang
On Tue, Aug 8, 2023 at 11:12 AM Xuan Zhuo wrote: > > On Tue, 8 Aug 2023 11:08:09 +0800, Jason Wang wrote: > > On Tue, Aug 8, 2023 at 10:52 AM Xuan Zhuo > > wrote: > > > > > > On Tue, 8 Aug 2023 10:26:04 +0800, Jason Wang wrote: > > > > On Mon,

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

2023-08-07 Thread Jason Wang
On Tue, Aug 8, 2023 at 10:52 AM Xuan Zhuo wrote: > > On Tue, 8 Aug 2023 10:26:04 +0800, Jason Wang wrote: > > On Mon, Aug 7, 2023 at 2:15 PM Xuan Zhuo wrote: > > > > > > On Wed, 2 Aug 2023 09:49:31 +0800, Xuan Zhuo > > > wrote: > > > > On

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-07 Thread Jason Wang
On Fri, Aug 4, 2023 at 1:58 AM Si-Wei Liu wrote: > > > > On 8/3/2023 1:03 AM, Jason Wang wrote: > > On Thu, Aug 3, 2023 at 1:13 AM Dragos Tatulea wrote: > >> The mr->initialized flag is shared between the control vq and data vq > >> part of the mr init/un

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-07 Thread Jason Wang
On Thu, Aug 3, 2023 at 7:40 PM Dragos Tatulea wrote: > > On Thu, 2023-08-03 at 16:03 +0800, Jason Wang wrote: > > On Thu, Aug 3, 2023 at 1:13 AM Dragos Tatulea wrote: > > > > > > The mr->initialized flag is shared between the control vq and data vq

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

2023-08-07 Thread Jason Wang
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: > > > > They really shouldn't - any NIC that takes forever to > > > > pr

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

2023-08-07 Thread Jason Wang
On Mon, Aug 7, 2023 at 2:15 PM Xuan Zhuo wrote: > > On Wed, 2 Aug 2023 09:49:31 +0800, Xuan Zhuo > wrote: > > On Tue, 1 Aug 2023 12:17:47 -0400, "Michael S. Tsirkin" > > wrote: > > > On Fri, Jul 28, 2023 at 02:02:33PM +0800, Xuan Zhuo wrote: > > > > On Tue, 25 Jul 2023 19:07:23 +0800, Xuan

Re: [PATCH 1/2] vdpa/mlx5: Fix mr->initialized semantics

2023-08-03 Thread Jason Wang
v_add() only in case firmware supports the general capability umem_uid_0. The reason for that is that 1:1 MRs must be created with uid == 0 while virtqueue objects can be created with uid == 0 only when the firmware capability is on. If the set_map() callback

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

2023-08-01 Thread Jason Wang
On Tue, Aug 1, 2023 at 4:17 PM Dragos Tatulea wrote: > > 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: > > &

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