Re: [PATCH] virtio_vdpa: Support surprise removal of virtio vdpa device

2022-01-11 Thread Jason Wang
On Wed, Jan 12, 2022 at 2:30 PM Michael S. Tsirkin wrote: > > On Wed, Jan 12, 2022 at 10:23:07AM +0800, Jason Wang wrote: > > On Tue, Jan 11, 2022 at 7:52 PM Michael S. Tsirkin wrote: > > > > > > On Tue, Jan 11, 2022 at 11:36:42AM +0800, 李东升 wrote: > > > > When virtio vdpa device removed, the abn

Re: [PATCH 4/4] vdpa/mlx5: Fix tracking of current number of VQs

2022-01-11 Thread Si-Wei Liu
On 1/11/2022 10:37 PM, Eli Cohen wrote: On Tue, Jan 11, 2022 at 02:14:47PM -0800, Si-Wei Liu wrote: On 1/11/2022 10:34 AM, Eli Cohen wrote: Modify the code such that ndev->cur_num_vqs better reflects the actual number of data virtqueues. The value can be accurately realized after features ha

Re: [PATCH] virtio_vdpa: Support surprise removal of virtio vdpa device

2022-01-11 Thread Michael S. Tsirkin
On Wed, Jan 12, 2022 at 10:23:07AM +0800, Jason Wang wrote: > On Tue, Jan 11, 2022 at 7:52 PM Michael S. Tsirkin wrote: > > > > On Tue, Jan 11, 2022 at 11:36:42AM +0800, 李东升 wrote: > > > When virtio vdpa device removed, the abnormal damage of the device cannot > > > be > > > perceived normally, w

Re: [PATCH 4/4] vdpa/mlx5: Fix tracking of current number of VQs

2022-01-11 Thread Jason Wang
On Wed, Jan 12, 2022 at 11:12 AM Si-Wei Liu wrote: > > > > On 1/11/2022 6:29 PM, Jason Wang wrote: > > On Wed, Jan 12, 2022 at 6:15 AM Si-Wei Liu wrote: > >> > >> > >> On 1/11/2022 10:34 AM, Eli Cohen wrote: > >>> Modify the code such that ndev->cur_num_vqs better reflects the actual > >>> number

Re: [PATCH 4/4] vdpa/mlx5: Fix tracking of current number of VQs

2022-01-11 Thread Si-Wei Liu
On 1/11/2022 6:29 PM, Jason Wang wrote: On Wed, Jan 12, 2022 at 6:15 AM Si-Wei Liu wrote: On 1/11/2022 10:34 AM, Eli Cohen wrote: Modify the code such that ndev->cur_num_vqs better reflects the actual number of data virtqueues. The value can be accurately realized after features have been

Re: [PATCH 2/4] vdpa/mlx5: Fix is_index_valid() to refer to features

2022-01-11 Thread Jason Wang
On Tue, Jan 11, 2022 at 8:11 PM Michael S. Tsirkin wrote: > > On Tue, Jan 11, 2022 at 01:31:28AM -0800, Si-Wei Liu wrote: > > > > > > On 1/10/2022 11:22 PM, Eli Cohen wrote: > > > Make sure the decision whether an index received trough a callback is > > > valid or not consults the negotiated featu

Re: [PATCH v7 07/14] vdpa/mlx5: Support configuring max data virtqueue

2022-01-11 Thread Jason Wang
On Tue, Jan 11, 2022 at 8:06 PM Michael S. Tsirkin wrote: > > On Tue, Jan 11, 2022 at 04:28:58PM +0800, Jason Wang wrote: > > On Tue, Jan 11, 2022 at 3:34 PM Eli Cohen wrote: > > > > > > On Mon, Jan 10, 2022 at 05:00:34PM -0800, Si-Wei Liu wrote: > > > > > > > > > > > > On 1/9/2022 6:10 AM, Eli C

Re: [PATCH 4/4] vdpa/mlx5: Fix tracking of current number of VQs

2022-01-11 Thread Jason Wang
On Wed, Jan 12, 2022 at 2:34 AM Eli Cohen wrote: > > Modify the code such that ndev->cur_num_vqs better reflects the actual > number of data virtqueues. The value can be accurately realized after > features have been negotiated. > > This is to prevent possible failures when modifying the RQT objec

Re: [PATCH 3/4] vdpa/mlx5: Fix is_index_valid() to refer to features

2022-01-11 Thread Jason Wang
On Wed, Jan 12, 2022 at 2:34 AM Eli Cohen wrote: > > Make sure the decision whether an index received through a callback is > valid or not consults the negotiated features. > > The motivation for this was due to a case encountered where I shut down > the VM. After the reset operation was called fe

Re: [PATCH 2/4] vdpa: Protect vdpa reset with cf_mutex

2022-01-11 Thread Jason Wang
On Wed, Jan 12, 2022 at 2:34 AM Eli Cohen wrote: > > Call reset using the wrapper function vdpa_reset() to make sure the > operation is serialized with cf_mutex. > > This comes to protect from the following possible scenario: > > vhost_vdpa_set_status() could call the reset op. Since the call is n

Re: [PATCH 1/4] vdpa: Avoid taking cf_mutex lock on get status

2022-01-11 Thread Jason Wang
On Wed, Jan 12, 2022 at 2:34 AM Eli Cohen wrote: > > Avoid the wrapper holding cf_mutex since it is not protecting anything. > To avoid confusion and unnecessary overhead incurred by it, remove. > > Fixes: f489f27bc0ab ("vdpa: Sync calls set/get config/status with cf_mutex") > Signed-off-by: Eli C

Re: [PATCH 4/4] vdpa/mlx5: Fix tracking of current number of VQs

2022-01-11 Thread Jason Wang
On Wed, Jan 12, 2022 at 6:15 AM Si-Wei Liu wrote: > > > > On 1/11/2022 10:34 AM, Eli Cohen wrote: > > Modify the code such that ndev->cur_num_vqs better reflects the actual > > number of data virtqueues. The value can be accurately realized after > > features have been negotiated. > > > > This is

Re: RE: [PATCH 0/6] virtio: support advance DMA

2022-01-11 Thread Xuan Zhuo
On Tue, 11 Jan 2022 10:46:41 -0500, Michael S. Tsirkin wrote: > On Tue, Jan 11, 2022 at 08:40:56AM +, Karlsson, Magnus wrote: > > > > > > > -Original Message- > > > From: Jason Wang > > > Sent: Tuesday, January 11, 2022 9:26 AM > > > To: Xuan Zhuo > > > Cc: Karlsson, Magnus ; virtual

Re: [PATCH] virtio_vdpa: Support surprise removal of virtio vdpa device

2022-01-11 Thread Jason Wang
On Tue, Jan 11, 2022 at 7:52 PM Michael S. Tsirkin wrote: > > On Tue, Jan 11, 2022 at 11:36:42AM +0800, 李东升 wrote: > > When virtio vdpa device removed, the abnormal damage of the device cannot be > > perceived normally, which will cause problems similar to: > > > > 43bb40c5b926 > > > Should includ

Re: [PATCH v7 07/14] vdpa/mlx5: Support configuring max data virtqueue

2022-01-11 Thread Si-Wei Liu
On 1/11/2022 7:21 AM, Eli Cohen wrote: On Tue, Jan 11, 2022 at 12:52:29AM -0800, Si-Wei Liu wrote: On 1/10/2022 11:34 PM, Eli Cohen wrote: On Mon, Jan 10, 2022 at 05:00:34PM -0800, Si-Wei Liu wrote: On 1/9/2022 6:10 AM, Eli Cohen wrote: On Thu, Jan 06, 2022 at 05:50:24PM -0800, Si-Wei Liu

Re: [PATCH 4/4] vdpa/mlx5: Fix tracking of current number of VQs

2022-01-11 Thread Si-Wei Liu
On 1/11/2022 10:34 AM, Eli Cohen wrote: Modify the code such that ndev->cur_num_vqs better reflects the actual number of data virtqueues. The value can be accurately realized after features have been negotiated. This is to prevent possible failures when modifying the RQT object if the cur_num_

Re: [PATCH 3/4] vdpa/mlx5: Fix is_index_valid() to refer to features

2022-01-11 Thread Si-Wei Liu
On 1/11/2022 10:33 AM, Eli Cohen wrote: Make sure the decision whether an index received through a callback is valid or not consults the negotiated features. The motivation for this was due to a case encountered where I shut down the VM. After the reset operation was called features were alre

Re: [PATCH 2/4] vdpa: Protect vdpa reset with cf_mutex

2022-01-11 Thread Si-Wei Liu
On 1/11/2022 10:33 AM, Eli Cohen wrote: Call reset using the wrapper function vdpa_reset() to make sure the operation is serialized with cf_mutex. This comes to protect from the following possible scenario: vhost_vdpa_set_status() could call the reset op. Since the call is not protected by c

Re: [PATCH 1/4] vdpa: Avoid taking cf_mutex lock on get status

2022-01-11 Thread Si-Wei Liu
On 1/11/2022 10:33 AM, Eli Cohen wrote: Avoid the wrapper holding cf_mutex since it is not protecting anything. To avoid confusion and unnecessary overhead incurred by it, remove. Fixes: f489f27bc0ab ("vdpa: Sync calls set/get config/status with cf_mutex") Signed-off-by: Eli Cohen Reviewed-

Re: [PATCH 2/4] vdpa/mlx5: Fix is_index_valid() to refer to features

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 06:03:57PM +0200, Eli Cohen wrote: > On Tue, Jan 11, 2022 at 10:57:57AM -0500, Michael S. Tsirkin wrote: > > On Tue, Jan 11, 2022 at 09:22:53AM +0200, Eli Cohen wrote: > > > Make sure the decision whether an index received trough a callback is > > > > through > > Wil fix.

Re: [PATCH 1/4] vdpa: Protect vdpa reset with cf_mutex

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 06:12:38PM +0200, Eli Cohen wrote: > On Tue, Jan 11, 2022 at 11:01:01AM -0500, Michael S. Tsirkin wrote: > > On Tue, Jan 11, 2022 at 09:22:17AM +0200, Eli Cohen wrote: > > > Call reset using the wrapper function vdpa_reset() to make sure the > > > operation is serialized wit

Re: [PATCH 1/4] vdpa: Protect vdpa reset with cf_mutex

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 09:22:17AM +0200, Eli Cohen wrote: > Call reset using the wrapper function vdpa_reset() to make sure the > operation is serialized with cf_mutex. > > Signed-off-by: Eli Cohen The motivation is vague here, this does not really explain. Which operations are we trying to ser

Re: [PATCH 2/4] vdpa/mlx5: Fix is_index_valid() to refer to features

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 09:22:53AM +0200, Eli Cohen wrote: > Make sure the decision whether an index received trough a callback is through > valid or not consults the negotiated features. > > Signed-off-by: Eli Cohen Which commit does this fix? > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 10

Re: RE: [PATCH 0/6] virtio: support advance DMA

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 08:40:56AM +, Karlsson, Magnus wrote: > > > > -Original Message- > > From: Jason Wang > > Sent: Tuesday, January 11, 2022 9:26 AM > > To: Xuan Zhuo > > Cc: Karlsson, Magnus ; virtualization > > ; Michael S.Tsirkin > > > > Subject: Re: RE: [PATCH 0/6] virtio:

Re: [PATCH v7 07/14] vdpa/mlx5: Support configuring max data virtqueue

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 05:21:54PM +0200, Eli Cohen wrote: > On Tue, Jan 11, 2022 at 12:52:29AM -0800, Si-Wei Liu wrote: > > > > > > On 1/10/2022 11:34 PM, Eli Cohen wrote: > > > On Mon, Jan 10, 2022 at 05:00:34PM -0800, Si-Wei Liu wrote: > > > > > > > > On 1/9/2022 6:10 AM, Eli Cohen wrote: > >

Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 08:57:49PM +0800, Yongji Xie wrote: > On Tue, Jan 11, 2022 at 7:54 PM Michael S. Tsirkin wrote: > > > > On Tue, Jan 11, 2022 at 11:31:37AM +0800, Yongji Xie wrote: > > > On Mon, Jan 10, 2022 at 11:44 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Jan 10, 2022

Re: [PATCH v2] virtio_vdpa: Support surprise removal of virtio vdpa device

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 02:55:27PM +0800, dongsheng li wrote: > When virtio vdpa device removed, the abnormal damage of the device cannot be > perceived normally, which will cause problems similar to: > > Commit 43bb40c5b926 ("virtio_pci: Support surprise removal of > virtio pci device") > Hence,

Re: [PATCH 2/4] vdpa/mlx5: Fix is_index_valid() to refer to features

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 01:31:28AM -0800, Si-Wei Liu wrote: > > > On 1/10/2022 11:22 PM, Eli Cohen wrote: > > Make sure the decision whether an index received trough a callback is > > valid or not consults the negotiated features. > > > > Signed-off-by: Eli Cohen > Reviewed-by: Si-Wei Liu > >

Re: [PATCH 2/4] vdpa/mlx5: Fix is_index_valid() to refer to features

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 01:16:17PM +0200, Eli Cohen wrote: > On Tue, Jan 11, 2022 at 01:31:28AM -0800, Si-Wei Liu wrote: > > > > > > On 1/10/2022 11:22 PM, Eli Cohen wrote: > > > Make sure the decision whether an index received trough a callback is > > > valid or not consults the negotiated featu

Re: [PATCH v7 07/14] vdpa/mlx5: Support configuring max data virtqueue

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 04:28:58PM +0800, Jason Wang wrote: > On Tue, Jan 11, 2022 at 3:34 PM Eli Cohen wrote: > > > > On Mon, Jan 10, 2022 at 05:00:34PM -0800, Si-Wei Liu wrote: > > > > > > > > > On 1/9/2022 6:10 AM, Eli Cohen wrote: > > > > On Thu, Jan 06, 2022 at 05:50:24PM -0800, Si-Wei Liu wr

Re: [PATCH 2/4] drivers/net/virtio_net: Added basic RSS support.

2022-01-11 Thread Michael S. Tsirkin
On Sun, Jan 09, 2022 at 11:06:57PM +0200, Andrew Melnychenko wrote: > Added features for RSS. > Added initialization, RXHASH feature and ethtool ops. > By default RSS/RXHASH is disabled. > Virtio RSS "IPv6 extensions" hashes disabled. > Added ethtools ops to set key and indirection table. > > Sign

Re: [PATCH v12 00/13] Introduce VDUSE - vDPA Device in Userspace

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 11:31:37AM +0800, Yongji Xie wrote: > On Mon, Jan 10, 2022 at 11:44 PM Michael S. Tsirkin wrote: > > > > On Mon, Jan 10, 2022 at 11:24:40PM +0800, Yongji Xie wrote: > > > On Mon, Jan 10, 2022 at 11:10 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Mon, Jan 10, 2022

Re: [PATCH] virtio_vdpa: Support surprise removal of virtio vdpa device

2022-01-11 Thread Michael S. Tsirkin
On Tue, Jan 11, 2022 at 11:36:42AM +0800, 李东升 wrote: > When virtio vdpa device removed, the abnormal damage of the device cannot be > perceived normally, which will cause problems similar to: > > 43bb40c5b926 Should include the subject of the patch too. > Hence, add the ability to abort the com

Re: [PATCH 2/4] vdpa/mlx5: Fix is_index_valid() to refer to features

2022-01-11 Thread Si-Wei Liu
On 1/10/2022 11:22 PM, Eli Cohen wrote: Make sure the decision whether an index received trough a callback is valid or not consults the negotiated features. Signed-off-by: Eli Cohen Reviewed-by: Si-Wei Liu Is there more for this series? Subject says there're 4 patches in total? --- dri

Re: [PATCH 1/4] vdpa: Protect vdpa reset with cf_mutex

2022-01-11 Thread Si-Wei Liu
On 1/10/2022 11:22 PM, Eli Cohen wrote: Call reset using the wrapper function vdpa_reset() to make sure the operation is serialized with cf_mutex. Signed-off-by: Eli Cohen --- drivers/vhost/vdpa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/vhost/vdpa.c b

Re: [PATCH v7 03/14] vdpa: Sync calls set/get config/status with cf_mutex

2022-01-11 Thread Si-Wei Liu
On 1/10/2022 8:46 PM, Jason Wang wrote: On Tue, Jan 11, 2022 at 9:30 AM Si-Wei Liu wrote: On 1/9/2022 10:05 PM, Jason Wang wrote: 在 2022/1/8 上午9:23, Si-Wei Liu 写道: On 1/6/2022 9:08 PM, Jason Wang wrote: 在 2022/1/7 上午8:33, Si-Wei Liu 写道: On 1/5/2022 3:46 AM, Eli Cohen wrote: Add wrapp

Re: RE: RE: [PATCH 0/6] virtio: support advance DMA

2022-01-11 Thread Xuan Zhuo
On Tue, 11 Jan 2022 09:01:21 +, Karlsson, Magnus wrote: > > > > -Original Message- > > From: Xuan Zhuo > > Sent: Tuesday, January 11, 2022 9:30 AM > > To: Jason Wang > > Cc: Karlsson, Magnus ; virtualization > > ; Michael S.Tsirkin > > > > Subject: Re: RE: [PATCH 0/6] virtio: suppo

Re: [PATCH v7 03/14] vdpa: Sync calls set/get config/status with cf_mutex

2022-01-11 Thread Si-Wei Liu
On 1/10/2022 10:26 PM, Parav Pandit wrote: From: Jason Wang Sent: Tuesday, January 11, 2022 10:17 AM I guess in this situation it would be better defer to the future patch to add such locking or wrapper, although right now there are just two additional calls taking the lock needlessly when

Re: [PATCH v7 07/14] vdpa/mlx5: Support configuring max data virtqueue

2022-01-11 Thread Si-Wei Liu
On 1/10/2022 11:34 PM, Eli Cohen wrote: On Mon, Jan 10, 2022 at 05:00:34PM -0800, Si-Wei Liu wrote: On 1/9/2022 6:10 AM, Eli Cohen wrote: On Thu, Jan 06, 2022 at 05:50:24PM -0800, Si-Wei Liu wrote: On 1/6/2022 5:27 PM, Si-Wei Liu wrote: On 1/5/2022 3:46 AM, Eli Cohen wrote: Check whether

Re: [PATCH v3 00/10] drm: Make drivers to honour the nomodeset parameter

2022-01-11 Thread Thomas Zimmermann
Hi patches 6 to 10 are Acked-by: Thomas Zimmermann Best regards Thomas Am 22.12.21 um 09:28 schrieb Javier Martinez Canillas: The nomodeset kernel command line parameter is used to prevent the KMS/DRM drivers to be registered/probed. But only a few drivers implement support for this and most

Re: RE: [PATCH 0/6] virtio: support advance DMA

2022-01-11 Thread Xuan Zhuo
On Tue, 11 Jan 2022 16:25:44 +0800, Jason Wang wrote: > On Tue, Jan 11, 2022 at 4:17 PM Xuan Zhuo wrote: > > > > On Tue, 11 Jan 2022 08:04:05 +, Karlsson, Magnus > > wrote: > > > > > > > > > > -Original Message- > > > > From: Xuan Zhuo > > > > Sent: Tuesday, January 11, 2022 7:17 A

Re: [PATCH v7 07/14] vdpa/mlx5: Support configuring max data virtqueue

2022-01-11 Thread Jason Wang
On Tue, Jan 11, 2022 at 3:34 PM Eli Cohen wrote: > > On Mon, Jan 10, 2022 at 05:00:34PM -0800, Si-Wei Liu wrote: > > > > > > On 1/9/2022 6:10 AM, Eli Cohen wrote: > > > On Thu, Jan 06, 2022 at 05:50:24PM -0800, Si-Wei Liu wrote: > > > > > > > > On 1/6/2022 5:27 PM, Si-Wei Liu wrote: > > > > > > >

Re: RE: [PATCH 0/6] virtio: support advance DMA

2022-01-11 Thread Jason Wang
On Tue, Jan 11, 2022 at 4:17 PM Xuan Zhuo wrote: > > On Tue, 11 Jan 2022 08:04:05 +, Karlsson, Magnus > wrote: > > > > > > > -Original Message- > > > From: Xuan Zhuo > > > Sent: Tuesday, January 11, 2022 7:17 AM > > > To: Jason Wang > > > Cc: virtualization ; Michael > > > S.Tsirk

Re: RE: [PATCH 0/6] virtio: support advance DMA

2022-01-11 Thread Xuan Zhuo
On Tue, 11 Jan 2022 08:04:05 +, Karlsson, Magnus wrote: > > > > -Original Message- > > From: Xuan Zhuo > > Sent: Tuesday, January 11, 2022 7:17 AM > > To: Jason Wang > > Cc: virtualization ; Michael > > S.Tsirkin > > ; Karlsson, Magnus > > Subject: Re: [PATCH 0/6] virtio: support