Re: [PATCH] vringh: Fix maximum number check for indirect descriptors

2022-05-05 Thread Jason Wang
On Wed, May 4, 2022 at 4:12 PM Xie Yongji wrote: > > We should use size of descriptor chain to check the maximum > number of consumed descriptors in indirect case. AFAIK, it's a guard for loop descriptors. > And the > statistical counts should also be reset to zero each time > we get an indirect

Re: [PATCH v4] vdpa/vp_vdpa : add vdpa tool support in vp_vdpa

2022-05-05 Thread Jason Wang
在 2022/4/29 17:10, Cindy Lu 写道: this patch is to add the support for vdpa tool in vp_vdpa here is the example steps modprobe vp_vdpa modprobe vhost_vdpa echo :00:06.0>/sys/bus/pci/drivers/virtio-pci/unbind echo 1af4 1041 > /sys/bus/pci/drivers/vp-vdpa/new_id vdpa dev add name vdpa1 mgmtdev

Re: [PATCH] vringh: Fix maximum number check for indirect descriptors

2022-05-05 Thread Jason Wang
On Thu, May 5, 2022 at 3:46 PM Jason Wang wrote: > > On Wed, May 4, 2022 at 4:12 PM Xie Yongji wrote: > > > > We should use size of descriptor chain to check the maximum > > number of consumed descriptors in indirect case. > > AFAIK, it's a guard for loop descriptors. > > > And the > > statistica

Re: [PATCH v3 1/2] vdpa: Add support for querying vendor statistics

2022-05-05 Thread Jason Wang
在 2022/5/4 13:44, Eli Cohen 写道: -Original Message- From: Si-Wei Liu Sent: Wednesday, May 4, 2022 7:44 AM To: Eli Cohen ; m...@redhat.com; jasow...@redhat.com Cc: virtualization@lists.linux-foundation.org; linux-ker...@vger.kernel.org Subject: Re: [PATCH v3 1/2] vdpa: Add support for q

Re: [PATCH v4 10/15] drm/shmem-helper: Take reservation lock instead of drm_gem_shmem locks

2022-05-05 Thread Daniel Vetter
On Wed, May 04, 2022 at 06:56:09PM +0300, Dmitry Osipenko wrote: > On 5/4/22 11:21, Daniel Vetter wrote: > ... > >>> - Maybe also do what you suggest and keep a separate lock for this, but > >>> the fundamental issue is that this doesn't really work - if you share > >>> buffers both ways with t

Re: [PATCH 3/3] vdpa/mlx5: Add RX MAC VLAN filter support

2022-05-05 Thread Jason Wang
在 2022/5/2 13:38, Eli Cohen 写道: +static virtio_net_ctrl_ack handle_ctrl_vlan(struct mlx5_vdpa_dev *mvdev, u8 cmd) +{ + struct mlx5_vdpa_net *ndev = to_mlx5_vdpa_ndev(mvdev); + virtio_net_ctrl_ack status = VIRTIO_NET_ERR; + struct mlx5_control_vq *cvq = &mvdev->cvq; + str

Re: [PATCH V3 3/9] virtio: introduce config op to synchronize vring callbacks

2022-05-05 Thread Jason Wang
在 2022/4/29 15:25, Cornelia Huck 写道: On Fri, Apr 29 2022, Jason Wang wrote: On Thu, Apr 28, 2022 at 5:13 PM Cornelia Huck wrote: On Mon, Apr 25 2022, Jason Wang wrote: This patch introduces new virtio config op to vring callbacks. Transport specific method is required to make sure the wr

Re: [PATCH] vringh: Fix maximum number check for indirect descriptors

2022-05-05 Thread Jason Wang
On Thu, May 5, 2022 at 4:06 PM Yongji Xie wrote: > > On Thu, May 5, 2022 at 3:47 PM Jason Wang wrote: > > > > On Wed, May 4, 2022 at 4:12 PM Xie Yongji wrote: > > > > > > We should use size of descriptor chain to check the maximum > > > number of consumed descriptors in indirect case. > > > > AF

Re: [PATCH] vdpa_sim_blk: add support for VIRTIO_BLK_T_FLUSH

2022-05-05 Thread Jason Wang
On Fri, Apr 29, 2022 at 3:14 PM Stefano Garzarella wrote: > > On Fri, Apr 29, 2022 at 10:46:40AM +0800, Jason Wang wrote: > >On Thu, Apr 28, 2022 at 11:13 PM Stefano Garzarella > >wrote: > >> > >> The simulator behaves like a ramdisk, so we don't have to do > >> anything when a VIRTIO_BLK_T_FLUS

Re: [PATCH v4 11/15] drm/shmem-helper: Add generic memory shrinker

2022-05-05 Thread Thomas Zimmermann
Hi Am 18.04.22 um 00:37 schrieb Dmitry Osipenko: Introduce a common DRM SHMEM shrinker. It allows to reduce code duplication among DRM drivers that implement theirs own shrinkers. This is initial version of the shrinker that covers basic needs of GPU drivers, both purging and eviction of shmem o

Re: [PATCH] vdpa_sim_blk: add support for VIRTIO_BLK_T_FLUSH

2022-05-05 Thread Stefano Garzarella
On Thu, May 05, 2022 at 04:26:24PM +0800, Jason Wang wrote: On Fri, Apr 29, 2022 at 3:14 PM Stefano Garzarella wrote: On Fri, Apr 29, 2022 at 10:46:40AM +0800, Jason Wang wrote: >On Thu, Apr 28, 2022 at 11:13 PM Stefano Garzarella wrote: >> >> The simulator behaves like a ramdisk, so we don'

[PATCH v5 0/5] virtio-crypto: Improve performance

2022-05-05 Thread zhenwei pi
v4 -> v5: - Fix potentially dereferencing uninitialized variables in 'virtio-crypto: use private buffer for control request'. Thanks to Dan Carpenter! v3 -> v4: - Don't create new file virtio_common.c, the new functions are added into virtio_crypto_core.c - Split the first patch into t

[PATCH v5 1/5] virtio-crypto: change code style

2022-05-05 Thread zhenwei pi
Use temporary variable to make code easy to read and maintain. /* Pad cipher's parameters */ vcrypto->ctrl.u.sym_create_session.op_type = cpu_to_le32(VIRTIO_CRYPTO_SYM_OP_CIPHER); vcrypto->ctrl.u.sym_create_session.u.cipher.para.algo = vcrypto

[PATCH v5 2/5] virtio-crypto: use private buffer for control request

2022-05-05 Thread zhenwei pi
Originally, all of the control requests share a single buffer( ctrl & input & ctrl_status fields in struct virtio_crypto), this allows queue depth 1 only, the performance of control queue gets limited by this design. In this patch, each request allocates request buffer dynamically, and free buffer

[PATCH v5 3/5] virtio-crypto: wait ctrl queue instead of busy polling

2022-05-05 Thread zhenwei pi
Originally, after submitting request into virtio crypto control queue, the guest side polls the result from the virt queue. This works like following: CPU0 CPU1 ... CPUx CPUy | | | | \ \

[PATCH v5 4/5] virtio-crypto: adjust dst_len at ops callback

2022-05-05 Thread zhenwei pi
From: lei he For some akcipher operations(eg, decryption of pkcs1pad(rsa)), the length of returned result maybe less than akcipher_req->dst_len, we need to recalculate the actual dst_len through the virt-queue protocol. Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Gonglei Signed-off-by: lei he

[PATCH v5 5/5] virtio-crypto: enable retry for virtio-crypto-dev

2022-05-05 Thread zhenwei pi
From: lei he Enable retry for virtio-crypto-dev, so that crypto-engine can process cipher-requests parallelly. Cc: Michael S. Tsirkin Cc: Jason Wang Cc: Gonglei Signed-off-by: lei he Signed-off-by: zhenwei pi --- drivers/crypto/virtio/virtio_crypto_core.c | 3 ++- 1 file changed, 2 inserti

Re: Re: PING: [PATCH v4 0/5] virtio-crypto: Improve performance

2022-05-05 Thread zhenwei pi
On 5/5/22 12:57, Michael S. Tsirkin wrote: On Thu, May 05, 2022 at 03:14:40AM +, Gonglei (Arei) wrote: -Original Message- From: zhenwei pi [mailto:pizhen...@bytedance.com] Sent: Thursday, May 5, 2022 10:35 AM To: Gonglei (Arei) ; m...@redhat.com; jasow...@redhat.com Cc: herb...@

Re: [PATCH v2] arm64: paravirt: Use RCU read locks to guard stolen_time

2022-05-05 Thread Will Deacon
Hi Elliot, On Thu, Apr 28, 2022 at 11:35:36AM -0700, Elliot Berman wrote: > From: Prakruthi Deepak Heragu > > During hotplug, the stolen time data structure is unmapped and memset. > There is a possibility of the timer IRQ being triggered before memset > and stolen time is getting updated as par

Re: [PATCH v4 11/15] drm/shmem-helper: Add generic memory shrinker

2022-05-05 Thread Daniel Vetter
On Thu, May 05, 2022 at 10:34:02AM +0200, Thomas Zimmermann wrote: > Hi > > Am 18.04.22 um 00:37 schrieb Dmitry Osipenko: > > Introduce a common DRM SHMEM shrinker. It allows to reduce code > > duplication among DRM drivers that implement theirs own shrinkers. > > This is initial version of the sh

Re: [PATCH v3 1/2] vdpa: Add support for querying vendor statistics

2022-05-05 Thread Si-Wei Liu
On 5/3/2022 10:44 PM, Eli Cohen wrote: -Original Message- From: Si-Wei Liu Sent: Wednesday, May 4, 2022 7:44 AM To: Eli Cohen ; m...@redhat.com; jasow...@redhat.com Cc: virtualization@lists.linux-foundation.org; linux-ker...@vger.kernel.org Subject: Re: [PATCH v3 1/2] vdpa: Add supp