Re: [PATCH v3] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread Gavin Shan
Hi Michael, On 1/19/22 3:39 PM, Michael S. Tsirkin wrote: On Wed, Jan 19, 2022 at 09:05:51AM +0800, Gavin Shan wrote: This enables virtio-mem device support by allowing to enable the corresponding kernel config option (CONFIG_VIRTIO_MEM) on the architecture. Signed-off-by: Gavin Shan Acked-by

Re: [PATCH v3] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread Michael S. Tsirkin
On Wed, Jan 19, 2022 at 09:05:51AM +0800, Gavin Shan wrote: > This enables virtio-mem device support by allowing to enable the > corresponding kernel config option (CONFIG_VIRTIO_MEM) on the > architecture. > > Signed-off-by: Gavin Shan > Acked-by: David Hildenbrand > Acked-by: Jonathan Cameron

Re: [PATCH 5/6] virtio: queue_reset: pci: support VIRTIO_F_RING_RESET

2022-01-18 Thread Xuan Zhuo
On Wed, 19 Jan 2022 14:11:29 +0800, Jason Wang wrote: > On Wed, Jan 19, 2022 at 10:35 AM Xuan Zhuo wrote: > > > > This patch implements virtio pci support for QUEUE RESET. > > > > Performing reset on a queue is divided into three steps: > > > > 1. reset_vq: notify the hardware queue to reset > >

Re: [PATCH 5/6] virtio: queue_reset: pci: support VIRTIO_F_RING_RESET

2022-01-18 Thread Xuan Zhuo
On Wed, 19 Jan 2022 14:12:55 +0800, Jason Wang wrote: > On Wed, Jan 19, 2022 at 2:11 PM Jason Wang wrote: > > > > On Wed, Jan 19, 2022 at 10:35 AM Xuan Zhuo > > wrote: > > > > > > This patch implements virtio pci support for QUEUE RESET. > > > > > > Performing reset on a queue is divided into t

Re: [PATCH 4/6] virtio: queue_reset: pci: extract some functions for subsequent patches

2022-01-18 Thread Xuan Zhuo
On Wed, 19 Jan 2022 14:04:51 +0800, Jason Wang wrote: > On Wed, Jan 19, 2022 at 10:35 AM Xuan Zhuo wrote: > > > > Add a vq_enable_vq_msix() function to enable a vq alone. > > > > Move irq's processing logic into vp_del_vq(), so that this function can > > handle a vq's del operation independently.

Re: [PATCH 1/6] virtio: pci: struct virtio_pci_common_cfg add queue_notify_data

2022-01-18 Thread Xuan Zhuo
On Wed, 19 Jan 2022 14:00:35 +0800, Jason Wang wrote: > On Wed, Jan 19, 2022 at 10:35 AM Xuan Zhuo wrote: > > > > Add queue_notify_data in struct virtio_pci_common_cfg, which comes from > > here https://github.com/oasis-tcs/virtio-spec/issues/89 > > > > Since I want to add queue_reset after it, I

Re: [PATCH 0/6] virtio pci support VIRTIO_F_RING_RESET

2022-01-18 Thread Xuan Zhuo
On Wed, 19 Jan 2022 14:13:39 +0800, Jason Wang wrote: > On Wed, Jan 19, 2022 at 10:35 AM Xuan Zhuo wrote: > > > > 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 0/6] virtio pci support VIRTIO_F_RING_RESET

2022-01-18 Thread Jason Wang
On Wed, Jan 19, 2022 at 10:35 AM Xuan Zhuo wrote: > > 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: > > https://github.com/oasis-tcs/virtio-spec/issues/124 > > virtio-

Re: [PATCH 5/6] virtio: queue_reset: pci: support VIRTIO_F_RING_RESET

2022-01-18 Thread Jason Wang
On Wed, Jan 19, 2022 at 2:11 PM Jason Wang wrote: > > On Wed, Jan 19, 2022 at 10:35 AM Xuan Zhuo wrote: > > > > This patch implements virtio pci support for QUEUE RESET. > > > > Performing reset on a queue is divided into three steps: > > > > 1. reset_vq: notify the hardware queue to reset > > 2.

Re: [PATCH 5/6] virtio: queue_reset: pci: support VIRTIO_F_RING_RESET

2022-01-18 Thread Jason Wang
On Wed, Jan 19, 2022 at 10:35 AM Xuan Zhuo wrote: > > This patch implements virtio pci support for QUEUE RESET. > > Performing reset on a queue is divided into three steps: > > 1. reset_vq: notify the hardware queue to reset > 2. del_reset_vq: delete the reset queue > 3. enable_reset_vq: re-enable

Re: [PATCH 4/6] virtio: queue_reset: pci: extract some functions for subsequent patches

2022-01-18 Thread Jason Wang
On Wed, Jan 19, 2022 at 10:35 AM Xuan Zhuo wrote: > > Add a vq_enable_vq_msix() function to enable a vq alone. > > Move irq's processing logic into vp_del_vq(), so that this function can > handle a vq's del operation independently. > > In the subsequent patches that supports queue reset, I have th

Re: [PATCH 1/6] virtio: pci: struct virtio_pci_common_cfg add queue_notify_data

2022-01-18 Thread Jason Wang
On Wed, Jan 19, 2022 at 10:35 AM Xuan Zhuo wrote: > > Add queue_notify_data in struct virtio_pci_common_cfg, which comes from > here https://github.com/oasis-tcs/virtio-spec/issues/89 > > Since I want to add queue_reset after it, I submitted this patch first. > > Signed-off-by: Xuan Zhuo > --- >

Re: [PATCH v2 2/2] virtio: acknowledge all features before access

2022-01-18 Thread Jason Wang
On Wed, Jan 19, 2022 at 1:04 AM Michael S. Tsirkin wrote: > > The feature negotiation was designed in a way that > makes it possible for devices to know which config > fields will be accessed by drivers. > > This is broken since commit 404123c2db79 ("virtio: allow drivers to > validate features")

Re: [PATCH] tools/virtio: fix virtio_test execution

2022-01-18 Thread Jason Wang
On Tue, Jan 18, 2022 at 11:06 PM Stefano Garzarella wrote: > > virtio_test hangs on __vring_new_virtqueue() because `vqs_list_lock` > is not initialized. > > Let's initialize it in vdev_info_init(). > > Signed-off-by: Stefano Garzarella Acked-by: Jason Wang > --- > tools/virtio/virtio_test.c

[PATCH 2/6] virtio: queue_reset: add VIRTIO_F_RING_RESET

2022-01-18 Thread Xuan Zhuo
Added VIRTIO_F_RING_RESET, it came from here https://github.com/oasis-tcs/virtio-spec/issues/124 Signed-off-by: Xuan Zhuo --- include/uapi/linux/virtio_config.h | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/virtio_config.h b/include/uapi/linux/virt

[PATCH 4/6] virtio: queue_reset: pci: extract some functions for subsequent patches

2022-01-18 Thread Xuan Zhuo
Add a vq_enable_vq_msix() function to enable a vq alone. Move irq's processing logic into vp_del_vq(), so that this function can handle a vq's del operation independently. In the subsequent patches that supports queue reset, I have the need to delete/enable a vq separately. Signed-off-by: Xuan Z

[PATCH 6/6] virtio: queue_reset: add helper

2022-01-18 Thread Xuan Zhuo
Add helper for virtio queue reset. * virtio_reset_vq: reset a queue individually * virtio_del_resetq: del a reset queue * virtio_enable_resetq: enable a reset queue Signed-off-by: Xuan Zhuo --- include/linux/virtio_config.h | 57 +++ 1 file changed, 57 insertions

[PATCH 0/6] virtio pci support VIRTIO_F_RING_RESET

2022-01-18 Thread 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: https://github.com/oasis-tcs/virtio-spec/issues/124 virtio-net's queue disable/enable function based on virtio queue reset is h

[PATCH 5/6] virtio: queue_reset: pci: support VIRTIO_F_RING_RESET

2022-01-18 Thread Xuan Zhuo
This patch implements virtio pci support for QUEUE RESET. Performing reset on a queue is divided into three steps: 1. reset_vq: notify the hardware queue to reset 2. del_reset_vq: delete the reset queue 3. enable_reset_vq: re-enable the reset queue Between steps 1 and 2, generally call virtqueue

[PATCH 1/6] virtio: pci: struct virtio_pci_common_cfg add queue_notify_data

2022-01-18 Thread Xuan Zhuo
Add queue_notify_data in struct virtio_pci_common_cfg, which comes from here https://github.com/oasis-tcs/virtio-spec/issues/89 Since I want to add queue_reset after it, I submitted this patch first. Signed-off-by: Xuan Zhuo --- include/uapi/linux/virtio_pci.h | 1 + 1 file changed, 1 insertion

[PATCH 3/6] virtio: queue_reset: pci: update struct virtio_pci_common_cfg and option functions

2022-01-18 Thread Xuan Zhuo
Add queue_reset in virtio_pci_common_cfg, and add related operation functions. Signed-off-by: Xuan Zhuo --- drivers/virtio/virtio_pci_modern_dev.c | 28 ++ include/linux/virtio_pci_modern.h | 2 ++ include/uapi/linux/virtio_pci.h| 1 + 3 files changed, 31 i

Re: [PATCH v2] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread Gavin Shan
On 1/19/22 12:05 AM, Michael S. Tsirkin wrote: On Tue, Jan 18, 2022 at 05:38:20PM +0800, Gavin Shan wrote: On 1/18/22 4:48 PM, Gavin Shan wrote: This enables virtio-mem device support by allowing to enable the corresponding kernel config option (CONFIG_VIRTIO_MEM) on the architecture. Signed-o

[PATCH v3] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread Gavin Shan
This enables virtio-mem device support by allowing to enable the corresponding kernel config option (CONFIG_VIRTIO_MEM) on the architecture. Signed-off-by: Gavin Shan Acked-by: David Hildenbrand Acked-by: Jonathan Cameron Acked-by: Michael S. Tsirkin --- v3: Pick ack-by tags from Jonathan and

Re: [PATCH V6 01/10] Use copy_process in vhost layer

2022-01-18 Thread Eric W. Biederman
Mike Christie writes: > On 1/17/22 11:31 AM, Eric W. Biederman wrote: >> Mike Christie writes: >> >>> On 12/22/21 12:24 PM, Eric W. Biederman wrote: All I am certain of is that you need to set "args->exit_signal = -1;". This prevents having to play games with do_notify_parent. >

Re: [PATCH V6 01/10] Use copy_process in vhost layer

2022-01-18 Thread Mike Christie
On 1/18/22 12:51 PM, Mike Christie wrote: > On 1/17/22 11:31 AM, Eric W. Biederman wrote: >> Mike Christie writes: >> >>> On 12/22/21 12:24 PM, Eric W. Biederman wrote: All I am certain of is that you need to set "args->exit_signal = -1;". This prevents having to play games with do

Re: [PATCH V6 01/10] Use copy_process in vhost layer

2022-01-18 Thread Mike Christie
On 1/17/22 11:31 AM, Eric W. Biederman wrote: > Mike Christie writes: > >> On 12/22/21 12:24 PM, Eric W. Biederman wrote: >>> All I am certain of is that you need to set >>> "args->exit_signal = -1;". This prevents having to play games with >>> do_notify_parent. >> >> Hi Eric, >> >> I have all y

Re: [PATCH] virtio: acknowledge all features before access

2022-01-18 Thread Cornelia Huck
On Tue, Jan 18 2022, "Michael S. Tsirkin" wrote: > On Mon, Jan 17, 2022 at 01:38:42PM +0100, Cornelia Huck wrote: >> On Mon, Jan 17 2022, "Michael S. Tsirkin" wrote: >> >> > On Mon, Jan 17, 2022 at 02:31:49PM +0800, Jason Wang wrote: >> >> >> >> 在 2022/1/15 上午4:09, Michael S. Tsirkin 写道: >> >>

[PATCH v2 2/2] virtio: acknowledge all features before access

2022-01-18 Thread Michael S. Tsirkin
The feature negotiation was designed in a way that makes it possible for devices to know which config fields will be accessed by drivers. This is broken since commit 404123c2db79 ("virtio: allow drivers to validate features") with fallout in at least block and net. We have a partial work-around i

[PATCH v2 1/2] virtio: unexport virtio_finalize_features

2022-01-18 Thread Michael S. Tsirkin
virtio_finalize_features is only used internally within virtio. No reason to export it. Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck Acked-by: Jason Wang --- drivers/virtio/virtio.c | 3 +-- include/linux/virtio.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --

Re: [PATCH v2] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread Michael S. Tsirkin
On Tue, Jan 18, 2022 at 05:38:20PM +0800, Gavin Shan wrote: > On 1/18/22 4:48 PM, Gavin Shan wrote: > > This enables virtio-mem device support by allowing to enable the > > corresponding kernel config option (CONFIG_VIRTIO_MEM) on the > > architecture. > > > > Signed-off-by: Gavin Shan > > Acked-

Re: [PATCH] virtio: acknowledge all features before access

2022-01-18 Thread Michael S. Tsirkin
On Mon, Jan 17, 2022 at 01:38:42PM +0100, Cornelia Huck wrote: > On Mon, Jan 17 2022, "Michael S. Tsirkin" wrote: > > > On Mon, Jan 17, 2022 at 02:31:49PM +0800, Jason Wang wrote: > >> > >> 在 2022/1/15 上午4:09, Michael S. Tsirkin 写道: > >> > @@ -495,6 +494,10 @@ int virtio_device_restore(struct vi

Re: [PATCH] virtio: acknowledge all features before access

2022-01-18 Thread Michael S. Tsirkin
On Tue, Jan 18, 2022 at 03:43:50PM +0100, Halil Pasic wrote: > On Fri, 14 Jan 2022 15:09:14 -0500 > "Michael S. Tsirkin" wrote: > > > The feature negotiation was designed in a way that > > makes it possible for devices to know which config > > fields will be accessed by drivers. > > > > This is

Re: [PATCH] virtio: acknowledge all features before access

2022-01-18 Thread Michael S. Tsirkin
On Tue, Jan 18, 2022 at 01:48:55PM +0100, Halil Pasic wrote: > On Fri, 14 Jan 2022 15:09:14 -0500 > "Michael S. Tsirkin" wrote: > > > The feature negotiation was designed in a way that > > makes it possible for devices to know which config > > fields will be accessed by drivers. > > > > This is

[PATCH] tools/virtio: fix virtio_test execution

2022-01-18 Thread Stefano Garzarella
virtio_test hangs on __vring_new_virtqueue() because `vqs_list_lock` is not initialized. Let's initialize it in vdev_info_init(). Signed-off-by: Stefano Garzarella --- tools/virtio/virtio_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio

Re: [PATCH] virtio: acknowledge all features before access

2022-01-18 Thread Halil Pasic
On Fri, 14 Jan 2022 15:09:14 -0500 "Michael S. Tsirkin" wrote: > The feature negotiation was designed in a way that > makes it possible for devices to know which config > fields will be accessed by drivers. > > This is broken since commit 404123c2db79 ("virtio: allow drivers to > validate featur

Re: [PATCH] virtio: acknowledge all features before access

2022-01-18 Thread Halil Pasic
On Fri, 14 Jan 2022 15:09:14 -0500 "Michael S. Tsirkin" wrote: > The feature negotiation was designed in a way that > makes it possible for devices to know which config > fields will be accessed by drivers. > > This is broken since commit 404123c2db79 ("virtio: allow drivers to > validate featur

Re: [PATCH] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread David Hildenbrand
On 18.01.22 11:43, Michael S. Tsirkin wrote: > On Tue, Jan 18, 2022 at 09:38:21AM +0100, David Hildenbrand wrote: >> On 18.01.22 02:34, Gavin Shan wrote: >>> This enables virtio-mem device support by allowing to enable the >>> corresponding kernel config option (CONFIG_VIRTIO_MEM) on the >>> archit

Re: [PATCH] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread Michael S. Tsirkin
On Tue, Jan 18, 2022 at 09:38:21AM +0100, David Hildenbrand wrote: > On 18.01.22 02:34, Gavin Shan wrote: > > This enables virtio-mem device support by allowing to enable the > > corresponding kernel config option (CONFIG_VIRTIO_MEM) on the > > architecture. > > > > Signed-off-by: Gavin Shan > >

Re: [PATCH v2] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread Gavin Shan
On 1/18/22 4:48 PM, Gavin Shan wrote: This enables virtio-mem device support by allowing to enable the corresponding kernel config option (CONFIG_VIRTIO_MEM) on the architecture. Signed-off-by: Gavin Shan Acked-by: David Hildenbrand --- v2: Improved the comments about the kernel config option

Re: [PATCH] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread Gavin Shan
On 1/18/22 5:22 PM, Jonathan Cameron wrote: On Tue, 18 Jan 2022 16:42:55 +0800 Gavin Shan wrote: On 1/18/22 4:38 PM, David Hildenbrand wrote: On 18.01.22 02:34, Gavin Shan wrote: This enables virtio-mem device support by allowing to enable the corresponding kernel config option (CONFIG_VIRTI

[PATCH v2] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread Gavin Shan
This enables virtio-mem device support by allowing to enable the corresponding kernel config option (CONFIG_VIRTIO_MEM) on the architecture. Signed-off-by: Gavin Shan Acked-by: David Hildenbrand --- v2: Improved the comments about the kernel config option (David) --- drivers/virtio/Kconfig | 7

Re: [PATCH] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread Gavin Shan
On 1/18/22 4:38 PM, David Hildenbrand wrote: On 18.01.22 02:34, Gavin Shan wrote: This enables virtio-mem device support by allowing to enable the corresponding kernel config option (CONFIG_VIRTIO_MEM) on the architecture. Signed-off-by: Gavin Shan --- drivers/virtio/Kconfig | 2 +- 1 file

Re: [PATCH] drivers/virtio: Enable virtio mem for ARM64

2022-01-18 Thread David Hildenbrand
On 18.01.22 02:34, Gavin Shan wrote: > This enables virtio-mem device support by allowing to enable the > corresponding kernel config option (CONFIG_VIRTIO_MEM) on the > architecture. > > Signed-off-by: Gavin Shan > --- > drivers/virtio/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletio

Re: [GIT PULL v2] virtio,vdpa,qemu_fw_cfg: features, cleanups, fixes

2022-01-18 Thread pr-tracker-bot
The pull request you sent on Fri, 14 Jan 2022 18:57:34 -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/3bf6a9e36e441714928d73a5adbc59562eb7ef19 Thank you! -- Deet-doot-dot, I am a b