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

2022-03-10 Thread Jason Wang
在 2022/3/10 下午4:20, 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

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

2022-03-10 Thread Jason Wang
在 2022/3/9 下午5:32, 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

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

2022-03-10 Thread Jason Wang
在 2022/3/10 下午12:46, 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: [PATCH 1/2] vsock: each transport cycles only on its own sockets

2022-03-10 Thread kernel test robot
Hi Jiyong, Thank you for the patch! Yet something to improve: [auto build test ERROR on 3bf7edc84a9eb4007dd9a0cb8878a7e1d5ec6a3b] url: https://github.com/0day-ci/linux/commits/Jiyong-Park/vsock-cycle-only-on-its-own-socket/20220310-205638 base: 3bf7edc84a9eb4007dd9a0cb8878a7e1d5ec6a3b

Re: [PATCH v1 0/5] Add memory shrinker to VirtIO-GPU DRM driver

2022-03-10 Thread Thomas Zimmermann
Hi Am 09.03.22 um 23:25 schrieb Dmitry Osipenko: The reason for this work is to keep GEM shmem pages mapped and allocated even while the BO is neither mapped nor pinned.  As it is now, GEM SHMEM creates and releases pages on each pin and unpin, and maps and unmaps memory ranges on each vmap

Re: [PATCH v3] vsock: each transport cycles only on its own sockets

2022-03-10 Thread Michael S. Tsirkin
On Thu, Mar 10, 2022 at 03:14:20PM +0100, Stefano Garzarella wrote: > On Thu, Mar 10, 2022 at 10:50:11PM +0900, Jiyong Park wrote: > > When iterating over sockets using vsock_for_each_connected_socket, make > > sure that a transport filters out sockets that don't belong to the > > transport. > >

Re: [bug report] virtio_net: support rx/tx queue reset

2022-03-10 Thread Xuan Zhuo
On Thu, 10 Mar 2022 18:12:21 +0300, Dan Carpenter wrote: > Hello Xuan Zhuo, > > The patch 26ae35c46f93: "virtio_net: support rx/tx queue reset" from > Mar 8, 2022, leads to the following Smatch static checker warning: Yes, thanks to you, I also found this problem today. > >

[bug report] virtio_net: support rx/tx queue reset

2022-03-10 Thread Dan Carpenter
Hello Xuan Zhuo, The patch 26ae35c46f93: "virtio_net: support rx/tx queue reset" from Mar 8, 2022, leads to the following Smatch static checker warning: drivers/net/virtio_net.c:1410 virtnet_napi_tx_disable() warn: sleeping in atomic context drivers/net/virtio_net.c 1829

Re: [PATCH v3] vsock: each transport cycles only on its own sockets

2022-03-10 Thread Stefano Garzarella
On Thu, Mar 10, 2022 at 10:50:11PM +0900, Jiyong Park wrote: When iterating over sockets using vsock_for_each_connected_socket, make sure that a transport filters out sockets that don't belong to the transport. There actually was an issue caused by this; in a nested VM configuration, destroying

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

2022-03-10 Thread Xuan Zhuo
On Thu, 10 Mar 2022 08:04:27 -0500, "Michael S. Tsirkin" wrote: > On Thu, Mar 10, 2022 at 08:33:30PM +0800, Xuan Zhuo wrote: > > On Thu, 10 Mar 2022 07:17:09 -0500, "Michael S. Tsirkin" > > wrote: > > > On Thu, Mar 10, 2022 at 04:14:16PM +0800, Xuan Zhuo wrote: > > > > On Thu, 10 Mar 2022

Re: [PATCH v2] vsock: each transport cycles only on its own sockets

2022-03-10 Thread Stefano Garzarella
On Thu, Mar 10, 2022 at 10:28:29PM +0900, Jiyong Park wrote: When iterating over sockets using vsock_for_each_connected_socket, make sure that a transport filters out sockets that don't belong to the transport. There actually was an issue caused by this; in a nested VM configuration, destroying

Re: [PATCH 1/2] vsock: each transport cycles only on its own sockets

2022-03-10 Thread Stefano Garzarella
On Thu, Mar 10, 2022 at 08:01:53AM -0500, Michael S. Tsirkin wrote: On Thu, Mar 10, 2022 at 09:54:24PM +0900, Jiyong Park wrote: When iterating over sockets using vsock_for_each_connected_socket, make sure that a transport filters out sockets that don't belong to the transport. There actually

Re: [PATCH 1/2] vsock: each transport cycles only on its own sockets

2022-03-10 Thread Michael S. Tsirkin
On Thu, Mar 10, 2022 at 10:11:32PM +0900, Jiyong Park wrote: > Hi Michael, > > Thanks for looking into this. > > Would you mind if I ask what you mean by incomplete? Is it because non-updated > modules will still have the issue? Please elaborate. What stefano wrote: I think there is the

Re: [PATCH 2/2] vsock: refactor vsock_for_each_connected_socket

2022-03-10 Thread Michael S. Tsirkin
On Thu, Mar 10, 2022 at 09:54:25PM +0900, Jiyong Park wrote: > vsock_for_each_connected_socket now cycles over sockets of a specific > transport only, rather than asking callers to do the filtering manually, > which is error-prone. > > Signed-off-by: Jiyong Park Pls just squash these two

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

2022-03-10 Thread Michael S. Tsirkin
On Thu, Mar 10, 2022 at 08:33:30PM +0800, Xuan Zhuo wrote: > On Thu, 10 Mar 2022 07:17:09 -0500, "Michael S. Tsirkin" > wrote: > > On Thu, Mar 10, 2022 at 04:14:16PM +0800, Xuan Zhuo wrote: > > > On Thu, 10 Mar 2022 03:07:22 -0500, "Michael S. Tsirkin" > > > wrote: > > > > On Thu, Mar 10, 2022

Re: [PATCH 1/2] vsock: each transport cycles only on its own sockets

2022-03-10 Thread Michael S. Tsirkin
On Thu, Mar 10, 2022 at 09:54:24PM +0900, Jiyong Park wrote: > When iterating over sockets using vsock_for_each_connected_socket, make > sure that a transport filters out sockets that don't belong to the > transport. > > There actually was an issue caused by this; in a nested VM > configuration,

Re: [PATCH 0/2] vsock: cycle only on its own socket

2022-03-10 Thread Michael S. Tsirkin
On Thu, Mar 10, 2022 at 07:57:58AM -0500, Michael S. Tsirkin wrote: > On Thu, Mar 10, 2022 at 09:54:23PM +0900, Jiyong Park wrote: > > Hi Stefano, > > > > As suggested [1], I've made two patches for easier backporting without > > breaking KMI. > > > > PATCH 1 fixes the very issue of cycling all

Re: [PATCH 0/2] vsock: cycle only on its own socket

2022-03-10 Thread Michael S. Tsirkin
On Thu, Mar 10, 2022 at 09:54:23PM +0900, Jiyong Park wrote: > Hi Stefano, > > As suggested [1], I've made two patches for easier backporting without > breaking KMI. > > PATCH 1 fixes the very issue of cycling all vsocks regardless of the > transport and shall be backported. > > PATCH 2 is a

Re: [PATCH 1/2] vsock: each transport cycles only on its own sockets

2022-03-10 Thread Michael S. Tsirkin
On Thu, Mar 10, 2022 at 07:53:25AM -0500, Michael S. Tsirkin wrote: > This message had > In-Reply-To: <20220310124936.4179591-1-jiy...@google.com> > in its header but 20220310124936.4179591-2-jiy...@google.com was > not sent to the list. > Please don't do that. Instead, please write and send a

Re: [PATCH 1/2] vsock: each transport cycles only on its own sockets

2022-03-10 Thread Michael S. Tsirkin
This message had In-Reply-To: <20220310124936.4179591-1-jiy...@google.com> in its header but 20220310124936.4179591-2-jiy...@google.com was not sent to the list. Please don't do that. Instead, please write and send a proper cover letter. Thanks! On Thu, Mar 10, 2022 at 09:49:35PM +0900, Jiyong

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

2022-03-10 Thread Xuan Zhuo
On Thu, 10 Mar 2022 07:17:09 -0500, "Michael S. Tsirkin" wrote: > On Thu, Mar 10, 2022 at 04:14:16PM +0800, Xuan Zhuo wrote: > > On Thu, 10 Mar 2022 03:07:22 -0500, "Michael S. Tsirkin" > > wrote: > > > On Thu, Mar 10, 2022 at 03:17:03PM +0800, Xuan Zhuo wrote: > > > > On Thu, 10 Mar 2022

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

2022-03-10 Thread Michael S. Tsirkin
On Thu, Mar 10, 2022 at 04:14:16PM +0800, Xuan Zhuo wrote: > On Thu, 10 Mar 2022 03:07:22 -0500, "Michael S. Tsirkin" > wrote: > > On Thu, Mar 10, 2022 at 03:17:03PM +0800, Xuan Zhuo wrote: > > > On Thu, 10 Mar 2022 02:00:39 -0500, "Michael S. Tsirkin" > > > wrote: > > > > On Tue, Mar 08, 2022

Re: [PATCH] vhost/vsock: reset only the h2g connections upon release

2022-03-10 Thread Stefano Garzarella
On Thu, Mar 10, 2022 at 07:41:54PM +0900, Jiyong Park wrote: Hi Stefano, On Thu, Mar 10, 2022 at 5:59 PM Stefano Garzarella wrote: Hi Jiyong, On Thu, Mar 10, 2022 at 05:18:54PM +0900, Jiyong Park wrote: >Filtering non-h2g connections out when determining orphaned connections. >Otherwise, in

Re: [PATCH] VMCI: Fix a couple of failure paths in vmci_guest_probe_device()

2022-03-10 Thread Greg KH
On Wed, Mar 09, 2022 at 10:24:56AM -0800, Vishnu Dasa wrote: > notification_bitmap may not be released when VMCI_CAPS_DMA_DATAGRAM > capability is missing from the device. Add missing > 'err_free_notification_bitmap' label and use it instead of > 'err_free_data_buffers' to avoid this. > >

Re: [PATCH] vhost/vsock: reset only the h2g connections upon release

2022-03-10 Thread Stefano Garzarella
Hi Jiyong, On Thu, Mar 10, 2022 at 05:18:54PM +0900, Jiyong Park wrote: Filtering non-h2g connections out when determining orphaned connections. Otherwise, in a nested VM configuration, destroying the nested VM (which often involves the closing of /dev/vhost-vsock if there was h2g connections

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

2022-03-10 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

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

2022-03-10 Thread Xuan Zhuo
On Thu, 10 Mar 2022 03:07:22 -0500, "Michael S. Tsirkin" wrote: > On Thu, Mar 10, 2022 at 03:17:03PM +0800, Xuan Zhuo wrote: > > 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

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

2022-03-10 Thread Michael S. Tsirkin
On Thu, Mar 10, 2022 at 03:17:03PM +0800, Xuan Zhuo wrote: > 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.