Re: [PATCH v9 22/32] virtio_pci: queue_reset: extract the logic of active vq for modern pci

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Introduce vp_active_vq() to configure vring to backend after vq attach vring. And configure vq vector if necessary. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_pci_modern.c | 46 ++ 1 file changed, 28 insertions(+), 18 del

Re:

2022-04-11 Thread Michael S. Tsirkin
On Tue, Mar 29, 2022 at 10:35:21AM +0200, Thomas Gleixner wrote: > On Mon, Mar 28 2022 at 06:40, Michael S. Tsirkin wrote: > > On Mon, Mar 28, 2022 at 02:18:22PM +0800, Jason Wang wrote: > >> > > So I think we might talk different issues: > >> > > > >> > > 1) Whether request_irq() commits the previ

[PATCH 5.15 135/277] virtio_console: eliminate anonymous module_init & module_exit

2022-04-11 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit fefb8a2a941338d871e2d83fbd65fbfa068857bd ] Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log. Give each of these init and exit functions unique d

Re: [PATCH v9 21/32] virtio_pci: queue_reset: update struct virtio_pci_common_cfg and option functions

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Add queue_reset in virtio_pci_common_cfg, and add related operation functions. For not breaks uABI, add a new struct virtio_pci_common_cfg_reset. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_pci_modern_dev.c | 36 ++ include/l

Re: [PATCH v9 18/32] virtio_ring: introduce virtqueue_resize()

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Introduce virtqueue_resize() to implement the resize of vring. Based on these, the driver can dynamically adjust the size of the vring. For example: ethtool -G. virtqueue_resize() implements resize based on the vq reset function. In case of failure to allocate

[PATCH 5.10 089/171] virtio_console: eliminate anonymous module_init & module_exit

2022-04-11 Thread Greg Kroah-Hartman
From: Randy Dunlap [ Upstream commit fefb8a2a941338d871e2d83fbd65fbfa068857bd ] Eliminate anonymous module_init() and module_exit(), which can lead to confusion or ambiguity when reading System.map, crashes/oops/bugs, or an initcall_debug log. Give each of these init and exit functions unique d

Re: [PATCH v9 12/32] virtio_ring: packed: extract the logic of alloc queue

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Separate the logic of packed to create vring queue. For the convenience of passing parameters, add a structure vring_packed. This feature is required for subsequent virtuqueue reset vring. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 70

Re: [PATCH v9 11/32] virtio_ring: split: introduce virtqueue_resize_split()

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: virtio ring split supports resize. Only after the new vring is successfully allocated based on the new num, we will release the old vring. In any case, an error is returned, indicating that the vring still points to the old vring. In the case of an error, the

Re: [PATCH v9 10/32] virtio_ring: split: introduce virtqueue_reinit_split()

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Introduce a function to initialize vq without allocating new ring, desc_state, desc_extra. Subsequent patches will call this function after reset vq to reinitialize vq. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c |

Re: [PATCH v9 09/32] virtio_ring: split: extract the logic of vq init

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Separate the logic of initializing vq, and subsequent patches will call it separately. The feature of this part is that it does not depend on the information passed by the upper layer and can be called repeatedly. Signed-off-by: Xuan Zhuo --- drivers/virtio

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

2022-04-11 Thread kernel test robot
Hi Dmitry, I love your patch! Perhaps something to improve: [auto build test WARNING on next-20220411] [cannot apply to drm/drm-next v5.18-rc2 v5.18-rc1 v5.17 v5.18-rc2] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '-

Re: [PATCH v9 08/32] virtio_ring: split: extract the logic of attach vring

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Separate the logic of attach vring, subsequent patches will call it separately. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/virtio/virtio_ring.c

Re: [PATCH v9 07/32] virtio_ring: split: extract the logic of alloc state and extra

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Separate the logic of creating desc_state, desc_extra, and subsequent patches will call it independently. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 53 ++-- 1 file changed, 38 insertions(+), 15 deletions(-)

Re: [PATCH v9 06/32] virtio_ring: split: extract the logic of alloc queue

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Separate the logic of split to create vring queue. This feature is required for subsequent virtuqueue reset vring. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_ring.c | 53 1 file changed, 36 insertions(+), 17 del

Re: [PATCH v9 05/32] virtio_ring: extract the logic of freeing vring

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Introduce vring_free() to free the vring of vq. Subsequent patches will use vring_free() alone. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-)

Re: [PATCH v9 04/32] virtio_ring: remove the arg vq of vring_alloc_desc_extra()

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: The parameter vq of vring_alloc_desc_extra() is useless. This patch removes this parameter. Subsequent patches will call this function to avoid passing useless arguments. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c

Re: [PATCH v9 03/32] virtio_ring: update the document of the virtqueue_detach_unused_buf for queue reset

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Added documentation for virtqueue_detach_unused_buf, allowing it to be called on queue reset. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

Re: [PATCH v9 02/32] virtio: struct virtio_config_ops add callbacks for queue_reset

2022-04-11 Thread Jason Wang
On Tue, Apr 12, 2022 at 10:47 AM Jason Wang wrote: > > > 在 2022/4/6 上午11:43, Xuan Zhuo 写道: > > Performing reset on a queue is divided into four steps: > > > > 1. transport: notify the device to reset the queue > > 2. vring: recycle the buffer submitted > > 3. vring: reset/resize the

Re: [PATCH v9 02/32] virtio: struct virtio_config_ops add callbacks for queue_reset

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Performing reset on a queue is divided into four steps: 1. transport: notify the device to reset the queue 2. vring: recycle the buffer submitted 3. vring: reset/resize the vring (may re-alloc) 4. transport: mmap vring to device, and enable the

Re: [PATCH v9 01/32] virtio: add helper virtqueue_get_vring_max_size()

2022-04-11 Thread Jason Wang
在 2022/4/6 上午11:43, Xuan Zhuo 写道: Record the maximum queue num supported by the device. virtio-net can display the maximum (supported by hardware) ring size in ethtool -g eth0. When the subsequent patch implements vring reset, it can judge whether the ring size passed by the driver is legal ba

Re: [PATCH V2 4/5] virtio-pci: implement synchronize_vqs()

2022-04-11 Thread Jason Wang
On Tue, Apr 12, 2022 at 8:02 AM Halil Pasic wrote: > > On Mon, 11 Apr 2022 16:27:41 +0200 > Cornelia Huck wrote: > > > On Mon, Apr 11 2022, Jason Wang wrote: > > > > > On Sun, Apr 10, 2022 at 3:51 PM Michael S. Tsirkin > > > wrote: > > >> > > >> On Fri, Apr 08, 2022 at 03:03:07PM +0200, Halil

Re: [PATCH V2 4/5] virtio-pci: implement synchronize_vqs()

2022-04-11 Thread Jason Wang
On Mon, Apr 11, 2022 at 4:56 PM Michael S. Tsirkin wrote: > > On Mon, Apr 11, 2022 at 04:22:19PM +0800, Jason Wang wrote: > > On Sun, Apr 10, 2022 at 3:51 PM Michael S. Tsirkin wrote: > > > > > > On Fri, Apr 08, 2022 at 03:03:07PM +0200, Halil Pasic wrote: > > > > On Wed, 06 Apr 2022 15:04:32 +02

Re: [PATCH V2 4/5] virtio-pci: implement synchronize_vqs()

2022-04-11 Thread Halil Pasic
On Mon, 11 Apr 2022 16:27:41 +0200 Cornelia Huck wrote: > On Mon, Apr 11 2022, Jason Wang wrote: > > > On Sun, Apr 10, 2022 at 3:51 PM Michael S. Tsirkin wrote: > > > >> > >> On Fri, Apr 08, 2022 at 03:03:07PM +0200, Halil Pasic wrote: > >> > On Wed, 06 Apr 2022 15:04:32 +0200 > >> > Corn

Re: [PATCH 25/27] block: add a bdev_discard_granularity helper

2022-04-11 Thread David Sterba
On Sat, Apr 09, 2022 at 06:50:41AM +0200, Christoph Hellwig wrote: > Abstract away implementation details from file systems by providing a > block_device based helper to retrieve the discard granularity. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Martin K. Petersen > Acked-by: Christoph

Re: [PATCH 24/27] block: remove QUEUE_FLAG_DISCARD

2022-04-11 Thread David Sterba
On Sat, Apr 09, 2022 at 06:50:40AM +0200, Christoph Hellwig wrote: > Just use a non-zero max_discard_sectors as an indicator for discard > support, similar to what is done for write zeroes. > > The only places where needs special attention is the RAID5 driver, > which must clear discard support fo

Re: [PATCH 08/27] btrfs: use bdev_max_active_zones instead of open coding it

2022-04-11 Thread David Sterba
On Sat, Apr 09, 2022 at 06:50:24AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn Acked-by: David Sterba ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linu

Re: [PATCH V2 4/5] virtio-pci: implement synchronize_vqs()

2022-04-11 Thread Cornelia Huck
On Mon, Apr 11 2022, Jason Wang wrote: > On Sun, Apr 10, 2022 at 3:51 PM Michael S. Tsirkin wrote: >> >> On Fri, Apr 08, 2022 at 03:03:07PM +0200, Halil Pasic wrote: >> > On Wed, 06 Apr 2022 15:04:32 +0200 >> > Cornelia Huck wrote: >> > >> > > On Wed, Apr 06 2022, "Michael S. Tsirkin" wrote: >

Re: [PATCH] fuse: avoid unnecessary spinlock bump

2022-04-11 Thread Vivek Goyal
On Mon, Apr 11, 2022 at 03:20:05PM +0200, Bernd Schubert wrote: > > > On 4/11/22 13:54, JeffleXu wrote: > > > > > > On 4/11/22 7:52 PM, Vivek Goyal wrote: > > > On Mon, Apr 11, 2022 at 10:10:23AM +0800, JeffleXu wrote: > > > > > > > > > > > > On 4/8/22 8:06 PM, Vivek Goyal wrote: > > > > Curi

Re: [PATCH] fuse: avoid unnecessary spinlock bump

2022-04-11 Thread JeffleXu
On 4/11/22 7:52 PM, Vivek Goyal wrote: > On Mon, Apr 11, 2022 at 10:10:23AM +0800, JeffleXu wrote: >> >> >> On 4/8/22 8:06 PM, Vivek Goyal wrote: >>> On Fri, Apr 08, 2022 at 07:50:55PM +0800, JeffleXu wrote: On 4/8/22 7:25 PM, Vivek Goyal wrote: > On Fri, Apr 08, 2022 at 10:36

Re: [PATCH] fuse: avoid unnecessary spinlock bump

2022-04-11 Thread Vivek Goyal
On Mon, Apr 11, 2022 at 10:10:23AM +0800, JeffleXu wrote: > > > On 4/8/22 8:06 PM, Vivek Goyal wrote: > > On Fri, Apr 08, 2022 at 07:50:55PM +0800, JeffleXu wrote: > >> > >> > >> On 4/8/22 7:25 PM, Vivek Goyal wrote: > >>> On Fri, Apr 08, 2022 at 10:36:40AM +0800, JeffleXu wrote: > > >

[PATCH v4 8/8] crypto: Introduce RSA algorithm

2022-04-11 Thread zhenwei pi
There are two parts in this patch: 1, support akcipher service by cryptodev-builtin driver 2, virtio-crypto driver supports akcipher service In principle, we should separate this into two patches, to avoid compiling error, merge them into one. Then virtio-crypto gets request from guest side, and

[PATCH v4 7/8] tests/crypto: Add test suite for crypto akcipher

2022-04-11 Thread zhenwei pi
From: lei he Add unit test and benchmark test for crypto akcipher. Signed-off-by: lei he Signed-off-by: zhenwei pi --- tests/bench/benchmark-crypto-akcipher.c | 161 ++ tests/bench/meson.build | 4 + tests/bench/test_akcipher_keys.inc | 537 ++ tests

[PATCH v4 6/8] crypto: Implement RSA algorithm by gcrypt

2022-04-11 Thread zhenwei pi
From: Lei He Added gcryt implementation of RSA algorithm, RSA algorithm implemented by gcrypt has a higher priority than nettle because it supports raw padding. Signed-off-by: Lei He --- crypto/akcipher-gcrypt.c.inc | 531 +++ crypto/akcipher.c| 4

[PATCH v4 5/8] crypto: Implement RSA algorithm by hogweed

2022-04-11 Thread zhenwei pi
From: Lei He Implement RSA algorithm by hogweed from nettle. Thus QEMU supports a 'real' RSA backend to handle request from guest side. It's important to test RSA offload case without OS & hardware requirement. Signed-off-by: Lei He Signed-off-by: zhenwei pi --- crypto/akcipher-nettle.c.inc |

[PATCH v4 4/8] crypto: add ASN.1 decoder

2022-04-11 Thread zhenwei pi
From: Lei He Add an ANS.1 decoder which is used to parse asymmetric cipher keys Signed-off-by: zhenwei pi Signed-off-by: Lei He --- crypto/asn1_decoder.c | 161 ++ crypto/asn1_decoder.h | 75 +++ crypto/meson.build| 1 + t

[PATCH v4 3/8] crypto: Introduce akcipher crypto class

2022-04-11 Thread zhenwei pi
Support basic asymmetric operations: encrypt, decrypt, sign and verify. Co-developed-by: lei he Signed-off-by: lei he Signed-off-by: zhenwei pi --- crypto/akcipher.c | 102 + crypto/akcipherpriv.h | 43 +++ crypto/meson.build| 1 + include

[PATCH v4 2/8] crypto-akcipher: Introduce akcipher types to qapi

2022-04-11 Thread zhenwei pi
From: Lei He Introduce akcipher types, also include RSA related types. Signed-off-by: Lei He Signed-off-by: zhenwei pi --- qapi/crypto.json | 64 1 file changed, 64 insertions(+) diff --git a/qapi/crypto.json b/qapi/crypto.json index 1ec54c15c

[PATCH v4 0/8] Introduce akcipher service for virtio-crypto

2022-04-11 Thread zhenwei pi
v3 -> v4: - Coding style fix: Akcipher -> AkCipher, struct XXX -> XXX, Rsa -> RSA, XXX-alg -> XXX-algo. - Change version info in qapi/crypto.json, from 7.0 -> 7.1. - Remove ecdsa from qapi/crypto.json, it would be introduced with the implemetion later. - Use QCryptoHashAlgothrim instead of QCrypto

[PATCH v4 1/8] virtio-crypto: header update

2022-04-11 Thread zhenwei pi
Update header from linux, support akcipher service. Reviewed-by: Gonglei Signed-off-by: lei he Signed-off-by: zhenwei pi --- .../standard-headers/linux/virtio_crypto.h| 82 ++- 1 file changed, 81 insertions(+), 1 deletion(-) diff --git a/include/standard-headers/linux/virt

Re: [PATCH V2 4/5] virtio-pci: implement synchronize_vqs()

2022-04-11 Thread Michael S. Tsirkin
On Mon, Apr 11, 2022 at 04:22:19PM +0800, Jason Wang wrote: > On Sun, Apr 10, 2022 at 3:51 PM Michael S. Tsirkin wrote: > > > > On Fri, Apr 08, 2022 at 03:03:07PM +0200, Halil Pasic wrote: > > > On Wed, 06 Apr 2022 15:04:32 +0200 > > > Cornelia Huck wrote: > > > > > > > On Wed, Apr 06 2022, "Mich

Re: [PATCH] tools/virtio: drop phys_addr_t typedef

2022-04-11 Thread Jason Wang
On Mon, Apr 11, 2022 at 9:39 AM Peng Fan (OSS) wrote: > > From: Peng Fan > > With commit 884ee1e585ca ("tools/include: Add phys_addr_t to types.h"), > > When building virtio tools, there is a type conficting error: > > " > ./linux/kernel.h:32:28: error: conflicting types for ‘phys_addr_t’ >32

Re: [PATCH V2 4/5] virtio-pci: implement synchronize_vqs()

2022-04-11 Thread Jason Wang
On Sun, Apr 10, 2022 at 3:51 PM Michael S. Tsirkin wrote: > > On Fri, Apr 08, 2022 at 03:03:07PM +0200, Halil Pasic wrote: > > On Wed, 06 Apr 2022 15:04:32 +0200 > > Cornelia Huck wrote: > > > > > On Wed, Apr 06 2022, "Michael S. Tsirkin" wrote: > > > > > > > On Wed, Apr 06, 2022 at 04:35:37PM +