Re: [PATCH v7 09/26] virtio_ring: split: implement virtqueue_reset_vring_split()

2022-03-09 Thread Xuan Zhuo
On Thu, 10 Mar 2022 02:00:39 -0500, "Michael S. Tsirkin" wrote: > On Tue, Mar 08, 2022 at 08:35:01PM +0800, Xuan Zhuo wrote: > > virtio ring supports reset. > > > > Queue reset is divided into several stages. > > > > 1. notify device queue reset > > 2. vring release > > 3. attach new vring > > 4.

Re: [PATCH v7 09/26] virtio_ring: split: implement virtqueue_reset_vring_split()

2022-03-09 Thread Michael S. Tsirkin
On Tue, Mar 08, 2022 at 08:35:01PM +0800, Xuan Zhuo wrote: > virtio ring supports reset. > > Queue reset is divided into several stages. > > 1. notify device queue reset > 2. vring release > 3. attach new vring > 4. notify device queue re-enable > > After the first step is completed, the vring r

Re: [PATCH v7 09/26] virtio_ring: split: implement virtqueue_reset_vring_split()

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 15:55:44 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > virtio ring supports reset. > > > > Queue reset is divided into several stages. > > > > 1. notify device queue reset > > 2. vring release > > 3. attach new vring > > 4. notify device queue re-enable > > >

Re: [PATCH v7 18/26] virtio: find_vqs() add arg sizes

2022-03-09 Thread Mathieu Poirier
On Tue, Mar 08, 2022 at 08:35:10PM +0800, Xuan Zhuo wrote: > find_vqs() adds a new parameter sizes to specify the size of each vq > vring. > > 0 means use the maximum size supported by the backend. > > In the split scenario, the meaning of size is the largest size, because > it may be limited by

Re: [PATCH 0/4] um: Assorted console related fixes

2022-03-09 Thread Randy Dunlap
On 3/9/22 08:21, Richard Weinberger wrote: > Randy, > > - Ursprüngliche Mail - >> Von: "Randy Dunlap" >> Uh, where are the patches? >> >>> http://lists.infradead.org/mailman/listinfo/linux-um >> >> not in that archive ^^^ > > https://lore.kernel.org/lkml

Re: [PATCH 0/4] um: Assorted console related fixes

2022-03-09 Thread Richard Weinberger
Randy, - Ursprüngliche Mail - > Von: "Randy Dunlap" > Uh, where are the patches? > >> http://lists.infradead.org/mailman/listinfo/linux-um > > not in that archive ^^^ https://lore.kernel.org/lkml/20220101215810.13260-1-rich...@nod.at/T/ Thanks, //richar

Re: [PATCH 0/4] um: Assorted console related fixes

2022-03-09 Thread Randy Dunlap
On 3/9/22 00:35, Richard Weinberger wrote: > - Ursprüngliche Mail - >>> This series fixes the console exit code to make sure UML >>> undoes everything it changed on the host side. >> >> I gave this a run hoping it would fix the issues I'm seeing with the console >> getting messed up when

Re: [PATCH V3 09/30] arm/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-03-09 Thread Anshuman Khandual
On 3/2/22 16:44, Geert Uytterhoeven wrote: > Hi Anshuman, > > On Wed, Mar 2, 2022 at 12:07 PM Anshuman Khandual > wrote: >> On 3/2/22 3:35 PM, Geert Uytterhoeven wrote: >>> On Wed, Mar 2, 2022 at 10:51 AM Anshuman Khandual >>> wrote: On 3/2/22 12:35 PM, Christophe Leroy wrote: > Le 02

Re: [PATCH V3 05/30] arm64/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-03-09 Thread Anshuman Khandual
On 3/3/22 20:58, Catalin Marinas wrote: > Hi Anshuman, > > On Mon, Feb 28, 2022 at 04:17:28PM +0530, Anshuman Khandual wrote: >> +static inline pgprot_t __vm_get_page_prot(unsigned long vm_flags) >> +{ >> +switch (vm_flags & (VM_READ | VM_WRITE | VM_EXEC | VM_SHARED)) { >> +case VM_NONE

Re: [PATCH v7 24/26] virtio_net: support rx/tx queue reset

2022-03-09 Thread Xuan Zhuo
Sorry, the last reply email was too fast, with some Chinese mixed in. So send another email. On Wed, 9 Mar 2022 17:14:34 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > This patch implements the reset function of the rx, tx queues. > > > > Based on this function, it is possible

Re: [PATCH v7 24/26] virtio_net: support rx/tx queue reset

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 17:14:34 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > This patch implements the reset function of the rx, tx queues. > > > > Based on this function, it is possible to modify the ring num of the > > queue. And quickly recycle the buffer in the queue. > > > >

Re: [PATCH v7 21/26] virtio: add helper virtio_find_vqs_ctx_size()

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 17:04:12 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > Introduce helper virtio_find_vqs_ctx_size() to call find_vqs and specify > > the maximum size of each vq ring. > > > > Signed-off-by: Xuan Zhuo > > --- > > include/linux/virtio_config.h | 12 ++

Re: [PATCH v7 26/26] virtio_net: support set_ringparam

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 17:29:28 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > Support set_ringparam based on virtio queue reset. > > > > The rx,tx_pending required to be passed must be power of 2. > > > > Signed-off-by: Xuan Zhuo > > --- > > drivers/net/virtio_net.c | 47 +++

Re: [PATCH v7 25/26] virtio_net: set the default max ring size by find_vqs()

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 17:28:21 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > Use virtio_find_vqs_ctx_size() to specify the maximum ring size of tx, > > rx at the same time. > > > > | rx/tx ring size > > --- > > spee

Re: [PATCH v7 18/26] virtio: find_vqs() add arg sizes

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 16:59:32 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > find_vqs() adds a new parameter sizes to specify the size of each vq > > vring. > > > > 0 means use the maximum size supported by the backend. > > > > In the split scenario, the meaning of size is the lar

Re: [PATCH v7 17/26] virtio_pci: queue_reset: support VIRTIO_F_RING_RESET

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 16:54:10 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > This patch implements virtio pci support for QUEUE RESET. > > > > Performing reset on a queue is divided into these steps: > > > > 1. virtio_reset_vq() - notify the device to reset the queu

Re: [PATCH v7 26/26] virtio_net: support set_ringparam

2022-03-09 Thread Jason Wang
在 2022/3/8 下午8:35, Xuan Zhuo 写道: Support set_ringparam based on virtio queue reset. The rx,tx_pending required to be passed must be power of 2. Signed-off-by: Xuan Zhuo --- drivers/net/virtio_net.c | 47 1 file changed, 47 insertions(+) diff --git

Re: [PATCH v7 25/26] virtio_net: set the default max ring size by find_vqs()

2022-03-09 Thread Jason Wang
在 2022/3/8 下午8:35, Xuan Zhuo 写道: Use virtio_find_vqs_ctx_size() to specify the maximum ring size of tx, rx at the same time. | rx/tx ring size --- speed == UNKNOWN or < 10G| 1024 speed < 40G | 4096 speed >= 40G

Re: [PATCH v7 14/26] virtio: add helper for queue reset

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 16:48:28 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > Add helper for virtio queue reset. > > > > * virtio_reset_vq(): reset a queue individually > > * virtio_enable_resetq(): enable a reset queue > > > > Signed-off-by: Xuan Zhuo > > --- > > include/linux/

Re: [PATCH v7 13/26] virtio: queue_reset: struct virtio_config_ops add callbacks for queue_reset

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 16:47:11 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > Performing reset on a queue is divided into four steps: > > > > 1. reset_vq() - notify the device to reset the queue > > 2. virtqueue_detach_unused_buf() - recycle the buffer subm

Re: [PATCH v7 09/26] virtio_ring: split: implement virtqueue_reset_vring_split()

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 15:55:44 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > virtio ring supports reset. > > > > Queue reset is divided into several stages. > > > > 1. notify device queue reset > > 2. vring release > > 3. attach new vring > > 4. notify device queue re-enable > > >

Re: [PATCH v7 08/26] virtio_ring: extract the logic of freeing vring

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 15:51:13 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:35, Xuan Zhuo 写道: > > Introduce vring_free() to free the vring of vq. > > > > Prevent double free by setting vq->reset. > > > > Signed-off-by: Xuan Zhuo > > --- > > drivers/virtio/virtio_ring.c | 25

Re: [PATCH v7 05/26] virtio_ring: split: extract the logic of init vq and attach vring

2022-03-09 Thread Xuan Zhuo
On Wed, 9 Mar 2022 15:36:59 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:34, Xuan Zhuo 写道: > > Split the logic of split assignment vq into three parts. > > > > 1. The assignment passed from the function parameter > > 2. The part that attaches vring to vq. -- __vring_virtqueue_attach_split() > > 3.

Re: [PATCH v7 04/26] virtio_ring: split: extract the logic of creating vring

2022-03-09 Thread Xuan Zhuo
Agree for all. Thanks. On Wed, 9 Mar 2022 14:46:01 +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:34, Xuan Zhuo 写道: > > Separate the logic of split to create vring queue. > > > > For the convenience of passing parameters, add a structure > > vring_split. > > > > This feature is required for subsequ

Re: [PATCH v7 24/26] virtio_net: support rx/tx queue reset

2022-03-09 Thread Jason Wang
在 2022/3/8 下午8:35, Xuan Zhuo 写道: This patch implements the reset function of the rx, tx queues. Based on this function, it is possible to modify the ring num of the queue. And quickly recycle the buffer in the queue. In the process of the queue disable, in theory, as long as virtio supports qu

Re: [PATCH v7 23/26] virtio_net: split free_unused_bufs()

2022-03-09 Thread Jason Wang
在 2022/3/8 下午8:35, Xuan Zhuo 写道: This patch separates two functions for freeing sq buf and rq buf from free_unused_bufs(). When supporting the enable/disable tx/rq queue in the future, it is necessary to support separate recovery of a sq buf or a rq buf. Signed-off-by: Xuan Zhuo Acked-by:

Re: [PATCH v7 21/26] virtio: add helper virtio_find_vqs_ctx_size()

2022-03-09 Thread Jason Wang
在 2022/3/8 下午8:35, Xuan Zhuo 写道: Introduce helper virtio_find_vqs_ctx_size() to call find_vqs and specify the maximum size of each vq ring. Signed-off-by: Xuan Zhuo --- include/linux/virtio_config.h | 12 1 file changed, 12 insertions(+) diff --git a/include/linux/virtio_confi

Re: [PATCH v7 00/26] virtio pci support VIRTIO_F_RING_RESET

2022-03-09 Thread Michael S. Tsirkin
On Wed, Mar 09, 2022 at 12:45:57PM +0800, Jason Wang wrote: > > 在 2022/3/8 下午8:34, Xuan Zhuo 写道: > > The virtio spec already supports the virtio queue reset function. This > > patch set > > is to add this function to the kernel. The relevant virtio spec information > > is > > here: > > > >

Re: [PATCH v7 18/26] virtio: find_vqs() add arg sizes

2022-03-09 Thread Jason Wang
在 2022/3/8 下午8:35, Xuan Zhuo 写道: find_vqs() adds a new parameter sizes to specify the size of each vq vring. 0 means use the maximum size supported by the backend. In the split scenario, the meaning of size is the largest size, because it may be limited by memory, the virtio core will try a sm

Re: [PATCH v7 17/26] virtio_pci: queue_reset: support VIRTIO_F_RING_RESET

2022-03-09 Thread Jason Wang
在 2022/3/8 下午8:35, Xuan Zhuo 写道: This patch implements virtio pci support for QUEUE RESET. Performing reset on a queue is divided into these steps: 1. virtio_reset_vq() - notify the device to reset the queue 2. virtqueue_detach_unused_buf() - recycle the buffer submitted 3.

Re: [PATCH v7 14/26] virtio: add helper for queue reset

2022-03-09 Thread Jason Wang
在 2022/3/8 下午8:35, Xuan Zhuo 写道: Add helper for virtio queue reset. * virtio_reset_vq(): reset a queue individually * virtio_enable_resetq(): enable a reset queue Signed-off-by: Xuan Zhuo --- include/linux/virtio_config.h | 40 +++ 1 file changed, 40 inserti

Re: [PATCH v7 13/26] virtio: queue_reset: struct virtio_config_ops add callbacks for queue_reset

2022-03-09 Thread Jason Wang
在 2022/3/8 下午8:35, Xuan Zhuo 写道: Performing reset on a queue is divided into four steps: 1. reset_vq() - notify the device to reset the queue 2. virtqueue_detach_unused_buf() - recycle the buffer submitted 3. virtqueue_reset_vring()- reset the vring (may re-al

Re: [PATCH 0/4] um: Assorted console related fixes

2022-03-09 Thread Richard Weinberger
- Ursprüngliche Mail - >> This series fixes the console exit code to make sure UML >> undoes everything it changed on the host side. > > I gave this a run hoping it would fix the issues I'm seeing with the console > getting messed up when UML exits via halt in the guest. Echo is turned off