Re: [PATCH V6 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-10-30 Thread Jason Wang
On 2019/10/31 上午5:23, Christoph Hellwig wrote: On Wed, Oct 30, 2019 at 02:44:44PM +0800, Jason Wang wrote: This sample driver creates mdev device that simulate virtio net device over virtio mdev transport. The device is implemented through vringh and workqueue. A device specific dma ops is to m

Re: [RFC] vhost_mdev: add network control vq support

2019-10-30 Thread Jason Wang
On 2019/10/30 下午7:54, Tiwei Bie wrote: On Wed, Oct 30, 2019 at 03:04:37PM +0800, Jason Wang wrote: On 2019/10/30 下午2:17, Tiwei Bie wrote: On Tue, Oct 29, 2019 at 06:51:32PM +0800, Jason Wang wrote: On 2019/10/29 下午6:17, Tiwei Bie wrote: This patch adds the network control vq support in vhost

Re: [PATCH V6 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework

2019-10-30 Thread Christoph Hellwig
On Wed, Oct 30, 2019 at 02:44:44PM +0800, Jason Wang wrote: > This sample driver creates mdev device that simulate virtio net device > over virtio mdev transport. The device is implemented through vringh > and workqueue. A device specific dma ops is to make sure HVA is used > directly as the IOVA.

Re: read_barrier_depends() usage in vhost.c

2019-10-30 Thread Will Deacon
Hi Jason, On Mon, Oct 21, 2019 at 01:48:53PM +0800, Jason Wang wrote: > On 2019/10/19 上午4:58, Will Deacon wrote: > > Staring at the code some more, my best bet at the moment > > is that the load of 'indirect->addr' is probably the one to worry about, > > since it's part of the vring and can be upd

RE: [PATCH net-next 11/14] vsock: add multi-transports support

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > > +/* Assign a transport to a socket and call the .init transport callback. > > + * > > + * Note: for stream socket this must be called when vsk->remote_addr > > +is set > > + * (e.g. during the connect() or when a connection request on a >

RE: [PATCH net-next 09/14] vsock: move vsock_insert_unbound() in the vsock_create()

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 09/14] vsock: move vsock_insert_unbound() in the > vsock_create() > > vsock_insert_unbound() was called only when 'sock' parameter of > __vsock_create() was not null. Thi

RE: [PATCH net-next 08/14] vsock: add vsock_create_connected() called by transports

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 08/14] vsock: add vsock_create_connected() called > by transports > > All transports call __vsock_create() with the same parameters, > most of them depending on the paren

RE: [PATCH net-next 07/14] vsock: handle buffer_size sockopts in the core

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 07/14] vsock: handle buffer_size sockopts in the > core > > virtio_transport and vmci_transport handle the buffer_size sockopts in a > very similar way. > > In order to

[PATCH 0/3] virtiofs: Small Cleanups for 5.5

2019-10-30 Thread Vivek Goyal
Hi Miklos, Here are few small cleanups for virtiofs for 5.5. I had received some comments from Michael Tsirkin on original virtiofs patches and these cleanups are result of these comments. Thanks Vivek Vivek Goyal (3): virtiofs: Use a common function to send forget virtiofs: Do not send forg

[PATCH 3/3] virtiofs: Use completions while waiting for queue to be drained

2019-10-30 Thread Vivek Goyal
While we wait for queue to finish draining, use completions instead of uslee_range(). This is better way of waiting for event. Signed-off-by: Vivek Goyal --- fs/fuse/virtio_fs.c | 39 +-- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/fs/fuse/

[PATCH 1/3] virtiofs: Use a common function to send forget

2019-10-30 Thread Vivek Goyal
Currently we are duplicating logic to send forgets at two places. Consolidate the code by calling one helper function. This also uses virtqueue_add_outbuf() instead of virtqueue_add_sgs(). Former is simpler to call. Signed-off-by: Vivek Goyal --- fs/fuse/virtio_fs.c | 150 +++---

[PATCH 2/3] virtiofs: Do not send forget request "struct list_head" element

2019-10-30 Thread Vivek Goyal
We are sending whole of virtio_fs_foreget struct to the other end over virtqueue. Other end does not need to see elements like "struct list". That's internal detail of guest kernel. Fix it. Signed-off-by: Vivek Goyal --- fs/fuse/virtio_fs.c | 17 - 1 file changed, 12 insertions(+

RE: [PATCH net-next 06/14] vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 06/14] vsock: add 'struct vsock_sock *' param to > vsock_core_get_transport() > > Since now the 'struct vsock_sock' object contains a pointer to the transport, > this pat

RE: [PATCH net-next 04/14] vsock: add 'transport' member in the struct vsock_sock

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 04/14] vsock: add 'transport' member in the struct > vsock_sock > > As a preparation to support multiple transports, this patch adds the > 'transport' member at the 'stru

RE: [PATCH net-next 02/14] vsock: remove vm_sockets_get_local_cid()

2019-10-30 Thread Jorgen Hansen via Virtualization
> -Original Message- > From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > To: net...@vger.kernel.org > Subject: [PATCH net-next 02/14] vsock: remove vm_sockets_get_local_cid() > > vm_sockets_get_local_cid() is only used in virtio_transport_

RE: [PATCH net-next 03/14] vsock: remove include/linux/vm_sockets.h file

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 03/14] vsock: remove include/linux/vm_sockets.h > file > > This header file now only includes the "uapi/linux/vm_sockets.h". > We can include directly it when needed. >

RE: [PATCH net-next 01/14] vsock/vmci: remove unused VSOCK_DEFAULT_CONNECT_TIMEOUT

2019-10-30 Thread Jorgen Hansen via Virtualization
> From: Stefano Garzarella [mailto:sgarz...@redhat.com] > Sent: Wednesday, October 23, 2019 11:56 AM > Subject: [PATCH net-next 01/14] vsock/vmci: remove unused > VSOCK_DEFAULT_CONNECT_TIMEOUT > > The VSOCK_DEFAULT_CONNECT_TIMEOUT definition was introduced with > commit d021c344051af ("VSOCK: Intr

Re: [RFC] vhost_mdev: add network control vq support

2019-10-30 Thread Tiwei Bie
On Wed, Oct 30, 2019 at 03:04:37PM +0800, Jason Wang wrote: > On 2019/10/30 下午2:17, Tiwei Bie wrote: > > On Tue, Oct 29, 2019 at 06:51:32PM +0800, Jason Wang wrote: > >> On 2019/10/29 下午6:17, Tiwei Bie wrote: > >>> This patch adds the network control vq support in vhost-mdev. > >>> A vhost-mdev spe

Re: [PATCH] iommu/virtio: Remove unused variable

2019-10-30 Thread Joerg Roedel
On Fri, Oct 25, 2019 at 01:13:40PM -0300, Cristiane Naves wrote: > Remove the variable of return. Issue found by > coccicheck(scripts/coccinelle/misc/returnvar.cocci) > > Signed-off-by: Cristiane Naves > --- > drivers/iommu/virtio-iommu.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-)

Re: [PATCH v3] vhost: introduce mdev based hardware backend

2019-10-30 Thread Jason Wang
On 2019/10/30 下午1:52, Tiwei Bie wrote: > On Wed, Oct 30, 2019 at 09:55:57AM +0800, Jason Wang wrote: >> On 2019/10/29 下午6:07, Tiwei Bie wrote: >>> This patch introduces a mdev based hardware vhost backend. >>> This backend is built on top of the same abstraction used >>> in virtio-mdev and provide

Re: [RFC] vhost_mdev: add network control vq support

2019-10-30 Thread Jason Wang
On 2019/10/30 下午2:17, Tiwei Bie wrote: > On Tue, Oct 29, 2019 at 06:51:32PM +0800, Jason Wang wrote: >> On 2019/10/29 下午6:17, Tiwei Bie wrote: >>> This patch adds the network control vq support in vhost-mdev. >>> A vhost-mdev specific op is introduced to allow parent drivers >>> to handle the netw