RE: [PATCH v2 00/10] Allow for configuring max number of virtqueue pairs

2021-12-13 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Tuesday, December 14, 2021 11:47 AM > > On Tue, Dec 14, 2021 at 12:11 PM Parav Pandit wrote: > > > > > > > From: Jason Wang > > > Sent: Tuesday, December 14, 2021 8:47 AM > > > > > > A question, consider the parent support both net and block, if user > > > use > >

Re: [PATCH v2 00/10] Allow for configuring max number of virtqueue pairs

2021-12-13 Thread Jason Wang
On Tue, Dec 14, 2021 at 12:11 PM Parav Pandit wrote: > > > > From: Jason Wang > > Sent: Tuesday, December 14, 2021 8:47 AM > > > > A question, consider the parent support both net and block, if user use > > > > vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 > > > > How do we know it's

Re: [PATCH] virtio-net: make copy len check in xdp_linearize_page

2021-12-13 Thread Jason Wang
On Tue, Dec 14, 2021 at 11:48 AM 孙蒙恩 wrote: > > Jason Wang 于2021年12月14日周二 11:13写道: > > > > On Mon, Dec 13, 2021 at 5:14 PM 孙蒙恩 wrote: > > > > > > Jason Wang 于2021年12月13日周一 15:49写道: > > > > > > > > On Mon, Dec 13, 2021 at 12:50 PM wrote: > > > > > > > > > > From: mengensun > > > > > > > > > >

Re: vdpa legacy guest support (was Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero)

2021-12-13 Thread Michael S. Tsirkin
On Mon, Dec 13, 2021 at 05:59:45PM -0800, Si-Wei Liu wrote: > > > On 12/12/2021 1:26 AM, Michael S. Tsirkin wrote: > > On Fri, Dec 10, 2021 at 05:44:15PM -0800, Si-Wei Liu wrote: > > > Sorry for reviving this ancient thread. I was kinda lost for the > > > conclusion > > > it ended up with. I hav

RE: [PATCH v2 00/10] Allow for configuring max number of virtqueue pairs

2021-12-13 Thread Parav Pandit via Virtualization
> From: Jason Wang > Sent: Tuesday, December 14, 2021 8:47 AM > > A question, consider the parent support both net and block, if user use > > vdpa dev add name vdpa-a mgmtdev auxiliary/mlx5_core.sf.1 > > How do we know it's a net or block device? Or do you expect some block > specific attribu

Re: [PATCH v2 07/10] vdpa: Add support for returning device configuration information

2021-12-13 Thread Jason Wang
On Mon, Dec 13, 2021 at 10:43 PM Eli Cohen wrote: > > Add netlink attribute to store flags indicating current state of the > device. > In addition, introduce a flag to indicate whether control virtqueue is > used. > > This indication can be retrieved by: > > vdpa dev config show vdpa-a > vdpa-a: m

Re: [PATCH v2 03/10] vdpa: Read device configuration only if FEATURES_OK

2021-12-13 Thread Jason Wang
On Mon, Dec 13, 2021 at 10:43 PM Eli Cohen wrote: > > Avoid reading device configuration during feature negotiation. Read > device status and verify that VIRTIO_CONFIG_S_FEATURES_OK is set. > Otherwise, return -EAGAIN. > > Signed-off-by: Eli Cohen > --- > drivers/vdpa/vdpa.c | 7 +++ > 1

Re: [PATCH v2 01/10] vdpa: Provide interface to read driver features

2021-12-13 Thread Jason Wang
On Mon, Dec 13, 2021 at 10:43 PM Eli Cohen wrote: > > Provide an interface to read the negotiated features. This is needed > when building the netlink message in vdpa_dev_net_config_fill(). > > Also fix the implementation of vdpa_dev_net_config_fill() to use the > negotiated features instead of th

Re: [PATCH v2 00/10] Allow for configuring max number of virtqueue pairs

2021-12-13 Thread Jason Wang
On Mon, Dec 13, 2021 at 10:43 PM Eli Cohen wrote: > > Allow the user to configure the max number of virtqueue pairs for a vdpa > instance. The user can then control the actual number of virtqueue pairs > using ethtool. > > Example, set number of VQPs to 2: > $ ethtool -L ens1 combined 2 > > A user

Re: [PATCH] virtio-net: make copy len check in xdp_linearize_page

2021-12-13 Thread Jason Wang
On Mon, Dec 13, 2021 at 5:14 PM 孙蒙恩 wrote: > > Jason Wang 于2021年12月13日周一 15:49写道: > > > > On Mon, Dec 13, 2021 at 12:50 PM wrote: > > > > > > From: mengensun > > > > > > xdp_linearize_page asume ring elem size is smaller then page size > > > when copy the first ring elem, but, there may be a el

Re: vdpa legacy guest support (was Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero)

2021-12-13 Thread Jason Wang
On Tue, Dec 14, 2021 at 10:00 AM Si-Wei Liu wrote: > > > > On 12/12/2021 1:26 AM, Michael S. Tsirkin wrote: > > On Fri, Dec 10, 2021 at 05:44:15PM -0800, Si-Wei Liu wrote: > >> Sorry for reviving this ancient thread. I was kinda lost for the conclusion > >> it ended up with. I have the following q

Re: vdpa legacy guest support (was Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero)

2021-12-13 Thread Si-Wei Liu
On 12/12/2021 1:26 AM, Michael S. Tsirkin wrote: On Fri, Dec 10, 2021 at 05:44:15PM -0800, Si-Wei Liu wrote: Sorry for reviving this ancient thread. I was kinda lost for the conclusion it ended up with. I have the following questions, 1. legacy guest support: from the past conversations it do

Re: vdpa legacy guest support (was Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero)

2021-12-13 Thread Si-Wei Liu
On 12/12/2021 7:02 PM, Jason Wang wrote: On Sun, Dec 12, 2021 at 5:26 PM Michael S. Tsirkin wrote: On Fri, Dec 10, 2021 at 05:44:15PM -0800, Si-Wei Liu wrote: Sorry for reviving this ancient thread. I was kinda lost for the conclusion it ended up with. I have the following questions, 1. leg

Re: [PATCH v2 09/10] vdpa: Support reporting max device virtqueues

2021-12-13 Thread Si-Wei Liu
On 12/13/2021 6:42 AM, Eli Cohen wrote: Add max_supported_vqs field to struct vdpa_mgmt_dev. Upstream drivers need to feel this value according to the device capabilities. This value is reported back in a netlink message when showing a device. Example: $ vdpa dev show vdpa-a: type network m

Re: [PATCH v1 3/7] vdpa: Allow to configure max data virtqueues

2021-12-13 Thread Si-Wei Liu
On 12/13/2021 5:07 AM, Eli Cohen wrote: On Mon, Dec 13, 2021 at 08:44:53AM +0200, Eli Cohen wrote: On Fri, Dec 10, 2021 at 10:29:43AM +0800, Jason Wang wrote: On Fri, Dec 10, 2021 at 5:51 AM Si-Wei Liu wrote: On 12/8/2021 9:36 PM, Jason Wang wrote: On Thu, Dec 9, 2021 at 8:25 AM Si-Wei L

Re: [PATCH v2 04/10] vdpa: Allow to configure max data virtqueues

2021-12-13 Thread Si-Wei Liu
On 12/13/2021 6:42 AM, Eli Cohen wrote: Add netlink support to configure the max virtqueue pairs for a device. At least one pair is required. The maximum is dictated by the device. Signed-off-by: Eli Cohen --- drivers/vdpa/vdpa.c | 14 +- include/linux/vdpa.h | 1 + 2 files

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

2021-12-13 Thread Michael S. Tsirkin
On Mon, Dec 13, 2021 at 05:44:13AM -0500, Michael S. Tsirkin wrote: > On Thu, Dec 09, 2021 at 04:22:58PM -0500, Michael S. Tsirkin wrote: > > 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 t

Re: [PATCH] virtio_mmio: pm: Add notification handlers for restore and freeze

2021-12-13 Thread Michael S. Tsirkin
On Mon, Dec 13, 2021 at 05:00:08PM +0100, Mikhail Golubev wrote: > From: Yurii Danilovskyi > > Handle restore and freeze notifications from the PM core. Expose > these to individual virtio drivers that can quiesce and resume vq > operations. > > Signed-off-by: Yurii Danilovskyi > Signed-off-by:

Re: [PATCH v2 05/10] vdpa/mlx5: Fix config_attr_mask assignment

2021-12-13 Thread Si-Wei Liu
On 12/13/2021 6:42 AM, Eli Cohen wrote: Fix VDPA_ATTR_DEV_NET_CFG_MACADDR assignment to be explicit 64 bit assignment. No issue was seen since the value is well below 64 bit max value. Nevertheless it needs to be fixed. Fixes: a007d940040c ("vdpa/mlx5: Support configuration of MAC") Acked-by

Re: [PATCH v2 09/10] vdpa: Support reporting max device virtqueues

2021-12-13 Thread Si-Wei Liu
On 12/13/2021 6:42 AM, Eli Cohen wrote: Add max_supported_vqs field to struct vdpa_mgmt_dev. Upstream drivers need to feel this value according to the device capabilities. This value is reported back in a netlink message when showing a device. Example: $ vdpa dev show vdpa-a: type network m

Re: [PATCH v2 07/10] vdpa: Add support for returning device configuration information

2021-12-13 Thread Si-Wei Liu
On 12/13/2021 6:42 AM, Eli Cohen wrote: Add netlink attribute to store flags indicating current state of the device. In addition, introduce a flag to indicate whether control virtqueue is used. This indication can be retrieved by: vdpa dev config show vdpa-a vdpa-a: mac 00:00:00:00:88:88 lin

Re: [GIT PULL] vhost: cleanups and fixes

2021-12-13 Thread pr-tracker-bot
The pull request you sent on Sun, 12 Dec 2021 17:59:51 -0500: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/5472f14a37421d1bca3dddf33cabd3bd6dbefbbc Thank you! -- Deet-doot-dot, I am a b

Re: [PATCH v1 1/7] vdpa: Provide interface to read driver featuresy

2021-12-13 Thread Si-Wei Liu
On 12/12/2021 5:38 AM, Eli Cohen wrote: On Thu, Dec 09, 2021 at 02:29:17PM -0800, Si-Wei Liu wrote: On 12/8/2021 10:47 PM, Eli Cohen wrote: On Wed, Dec 08, 2021 at 03:57:21PM -0800, Si-Wei Liu wrote: On 12/8/2021 12:14 PM, Eli Cohen wrote: Provide an interface to read the negotiated featu

Re: [PATCH] virtio_mmio: pm: Add notification handlers for restore and freeze

2021-12-13 Thread kernel test robot
/linux.git 136057256686de39cc3a07c2e39ef6bc43003ff6 config: m68k-randconfig-r033-20211213 (https://download.01.org/0day-ci/archive/20211214/202112140201.xecfvzym-...@intel.com/config) compiler: m68k-linux-gcc (GCC) 11.2.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/mak

Re: [PATCH 5/5] dax: always use _copy_mc_to_iter in dax_copy_to_iter

2021-12-13 Thread Dan Williams
On Mon, Dec 13, 2021 at 12:20 AM Christoph Hellwig wrote: > > On Sun, Dec 12, 2021 at 06:48:05AM -0800, Dan Williams wrote: > > On Fri, Dec 10, 2021 at 6:05 AM Vivek Goyal wrote: > > > > > > On Thu, Dec 09, 2021 at 07:38:28AM +0100, Christoph Hellwig wrote: > > > > While using the MC-safe copy ro

Re: [PATCH 4/5] dax: remove the copy_from_iter and copy_to_iter methods

2021-12-13 Thread Vivek Goyal
On Sun, Dec 12, 2021 at 06:44:26AM -0800, Dan Williams wrote: > On Fri, Dec 10, 2021 at 6:17 AM Vivek Goyal wrote: > > > > On Thu, Dec 09, 2021 at 07:38:27AM +0100, Christoph Hellwig wrote: > > > These methods indirect the actual DAX read/write path. In the end pmem > > > uses magic flush and mc

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

2021-12-13 Thread Michael S. Tsirkin
On Thu, Dec 09, 2021 at 04:22:58PM -0500, Michael S. Tsirkin wrote: > 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,

Re: vdpa legacy guest support (was Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero)

2021-12-13 Thread Michael S. Tsirkin
On Mon, Dec 13, 2021 at 04:57:38PM +0800, Jason Wang wrote: > On Mon, Dec 13, 2021 at 4:07 PM Michael S. Tsirkin wrote: > > > > On Mon, Dec 13, 2021 at 11:02:39AM +0800, Jason Wang wrote: > > > On Sun, Dec 12, 2021 at 5:26 PM Michael S. Tsirkin > > > wrote: > > > > > > > > On Fri, Dec 10, 2021 a

Re: vdpa legacy guest support (was Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero)

2021-12-13 Thread Jason Wang
On Mon, Dec 13, 2021 at 4:07 PM Michael S. Tsirkin wrote: > > On Mon, Dec 13, 2021 at 11:02:39AM +0800, Jason Wang wrote: > > On Sun, Dec 12, 2021 at 5:26 PM Michael S. Tsirkin wrote: > > > > > > On Fri, Dec 10, 2021 at 05:44:15PM -0800, Si-Wei Liu wrote: > > > > Sorry for reviving this ancient t

Re: [PATCH 1/5] uio: remove copy_from_iter_flushcache() and copy_mc_to_iter()

2021-12-13 Thread Christoph Hellwig
On Sun, Dec 12, 2021 at 06:22:20AM -0800, Dan Williams wrote: > > - * Use the 'no check' versions of copy_from_iter_flushcache() and > > - * copy_mc_to_iter() to bypass HARDENED_USERCOPY overhead. Bounds > > + * Use the 'no check' versions of _copy_from_iter_flushcache() and > > + * _copy_mc_to_ite

Re: [PATCH 4/5] dax: remove the copy_from_iter and copy_to_iter methods

2021-12-13 Thread Christoph Hellwig
On Sun, Dec 12, 2021 at 06:39:16AM -0800, Dan Williams wrote: > > /* flag to check if device supports synchronous flush */ > > DAXDEV_SYNC, > > + /* do not use uncached operations to write data */ > > + DAXDEV_CACHED, > > + /* do not use mcsafe operations to read d

Re: [PATCH 4/5] dax: remove the copy_from_iter and copy_to_iter methods

2021-12-13 Thread Christoph Hellwig
On Sun, Dec 12, 2021 at 06:44:26AM -0800, Dan Williams wrote: > On Fri, Dec 10, 2021 at 6:17 AM Vivek Goyal wrote: > > Going forward, I am wondering should virtiofs use flushcache version as > > well. What if host filesystem is using DAX and mapping persistent memory > > pfn directly into qemu add

Re: [PATCH 5/5] dax: always use _copy_mc_to_iter in dax_copy_to_iter

2021-12-13 Thread Christoph Hellwig
On Sun, Dec 12, 2021 at 06:48:05AM -0800, Dan Williams wrote: > On Fri, Dec 10, 2021 at 6:05 AM Vivek Goyal wrote: > > > > On Thu, Dec 09, 2021 at 07:38:28AM +0100, Christoph Hellwig wrote: > > > While using the MC-safe copy routines is rather pointless on a virtual > > > device > > > like virtio

Re: vdpa legacy guest support (was Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero)

2021-12-13 Thread Michael S. Tsirkin
On Mon, Dec 13, 2021 at 11:02:39AM +0800, Jason Wang wrote: > On Sun, Dec 12, 2021 at 5:26 PM Michael S. Tsirkin wrote: > > > > On Fri, Dec 10, 2021 at 05:44:15PM -0800, Si-Wei Liu wrote: > > > Sorry for reviving this ancient thread. I was kinda lost for the > > > conclusion > > > it ended up wit