Re: [RFC PATCH 13/13] vsock: fix bind() behaviour taking care of CID

2019-10-09 Thread Stefan Hajnoczi
with different CID, and > it prevents a connection to a wrong socket bound to the same > port, but with different CID. > > Signed-off-by: Stefano Garzarella > --- > net/vmw_vsock/af_vsock.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) Reviewed-

Re: [RFC PATCH 12/13] vsock: prevent transport modules unloading

2019-10-09 Thread Stefan Hajnoczi
ssign_transport(struct vsock_sock *vsk, > struct vsock_sock *psk) > return -ESOCKTNOSUPPORT; > } > > - if (!vsk->transport) > + /* We increase the module refcnt to prevent the tranport unloading s/tranport/transport/ Otherwise: Reviewed-by: Stefan H

Re: [RFC PATCH 11/13] vsock: add 'transport_hg' to handle g2h\h2g transports

2019-10-09 Thread Stefan Hajnoczi
On Fri, Sep 27, 2019 at 01:27:01PM +0200, Stefano Garzarella wrote: > VMCI transport provides both g2h and h2g behaviors in a single > transport. > We are able to set (or not) the g2h behavior, detecting if we > are in a VMware guest (or not), but the h2g feature is always set. > This prevents to l

Re: [RFC PATCH 10/13] vsock: add multi-transports support

2019-10-09 Thread Stefan Hajnoczi
On Fri, Sep 27, 2019 at 01:27:00PM +0200, Stefano Garzarella wrote: > RFC: > - I'd like to move MODULE_ALIAS_NETPROTO(PF_VSOCK) to af_vsock.c. > @Jorgen could this break the VMware products? What will cause the vmw_vsock_vmci_transport.ko module to be loaded after you remove MODULE_ALIAS_NETPROT

Re: [RFC PATCH 09/13] hv_sock: set VMADDR_CID_HOST in the hvs_remote_addr_init()

2019-10-09 Thread Stefan Hajnoczi
d, 2 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [RFC PATCH 08/13] vsock: move vsock_insert_unbound() in the vsock_create()

2019-10-09 Thread Stefan Hajnoczi
ock_create() directly. They always pass NULL as the parent socket, so we could have a more specific function that transports call without a parent sock argument. This would eliminate any concern over moving vsock_insert_unbound() out of this function. In any case, I've checked the code and

Re: [RFC PATCH 07/13] vsock: handle buffer_size sockopts in the core

2019-10-09 Thread Stefan Hajnoczi
On Fri, Sep 27, 2019 at 01:26:57PM +0200, Stefano Garzarella wrote: > @@ -140,18 +145,11 @@ struct vsock_transport { > struct vsock_transport_send_notify_data *); > int (*notify_send_post_enqueue)(struct vsock_sock *, ssize_t, > struct vsock_transport_send_notify_d

Re: [RFC PATCH 06/13] vsock: add 'struct vsock_sock *' param to vsock_core_get_transport()

2019-10-09 Thread Stefan Hajnoczi
sport uses this >* function and only while registered. >*/ > - return transport_single; This comment is about protecting transport_single. It no longer applies when using vsk->transport. Please drop it. Otherwise: Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [RFC PATCH 05/13] vsock/virtio: add transport parameter to the virtio_transport_reset_no_sock()

2019-10-09 Thread Stefan Hajnoczi
vsock.c | 94 +++--- > include/linux/virtio_vsock.h| 3 +- > net/vmw_vsock/virtio_transport.c| 160 ++++---- > net/vmw_vsock/virtio_transport_common.c | 12 +- > 4 files changed, 135 insertions(+), 134 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [RFC PATCH 04/13] vsock: add 'transport' member in the struct vsock_sock

2019-10-09 Thread Stefan Hajnoczi
> --- > include/net/af_vsock.h | 1 + > net/vmw_vsock/af_vsock.c | 56 +++- > 2 files changed, 39 insertions(+), 18 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [RFC PATCH 01/13] vsock/vmci: remove unused VSOCK_DEFAULT_CONNECT_TIMEOUT

2019-10-09 Thread Stefan Hajnoczi
T_CONNECT_TIMEOUT is used and defined in > net/vmw_vsock/af_vsock.c > > Signed-off-by: Stefano Garzarella > --- > net/vmw_vsock/vmci_transport.c | 5 - > 1 file changed, 5 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [RFC PATCH 02/13] vsock: remove vm_sockets_get_local_cid()

2019-10-09 Thread Stefan Hajnoczi
off-by: Stefano Garzarella > --- > include/linux/vm_sockets.h | 2 -- > net/vmw_vsock/af_vsock.c| 10 -- > net/vmw_vsock/virtio_transport_common.c | 2 +- > 3 files changed, 1 insertion(+), 13 deletions(-) Reviewed-by: Stefan Hajnoczi

Re: [RFC PATCH 03/13] vsock: remove include/linux/vm_sockets.h file

2019-10-09 Thread Stefan Hajnoczi
- > include/net/af_vsock.h| 2 +- > include/net/vsock_addr.h | 2 +- > net/vmw_vsock/vmci_transport_notify.h | 1 - > 4 files changed, 2 insertions(+), 16 deletions(-) > delete mode 100644 include/linux/vm_sockets.h Reviewed-by: Stefan

Re: [PATCH] fuse: unexport fuse_put_request

2019-09-19 Thread Stefan Hajnoczi
xes: 66abc3599c3c ("fuse: unexport request ops") > Signed-off-by: Arnd Bergmann > --- > fs/fuse/dev.c | 1 - > 1 file changed, 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v5 0/4] virtio-fs: shared file system for virtual machines

2019-09-12 Thread Stefan Hajnoczi
On Thu, Sep 12, 2019 at 10:14:11AM +0200, Miklos Szeredi wrote: > On Wed, Sep 11, 2019 at 5:54 PM Stefan Hajnoczi wrote: > > > > On Tue, Sep 10, 2019 at 05:12:02PM +0200, Miklos Szeredi wrote: > > > I've folded the series from Vivek and fixed a couple of TODO comme

Re: [PATCH v5 0/4] virtio-fs: shared file system for virtual machines

2019-09-11 Thread Stefan Hajnoczi
On Tue, Sep 10, 2019 at 05:12:02PM +0200, Miklos Szeredi wrote: > I've folded the series from Vivek and fixed a couple of TODO comments > myself. AFAICS two issues remain that need to be resolved in the short > term, one way or the other: freeze/restore and full virtqueue. I have researched freez

Re: [PATCH v5 0/4] virtio-fs: shared file system for virtual machines

2019-09-11 Thread Stefan Hajnoczi
On Tue, Sep 10, 2019 at 05:12:02PM +0200, Miklos Szeredi wrote: > Git tree for this version is available here: > > git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git#virtiofs-v5 > > Only post patches that actually add virtiofs (virtiofs-v5-base..virtiofs-v5). > > I've folded the ser

Re: [Virtio-fs] [PATCH 00/18] virtiofs: Fix various races and cleanups round 1

2019-09-09 Thread Stefan Hajnoczi
On Sun, Sep 08, 2019 at 07:53:55PM +0800, piaojun wrote: > > > On 2019/9/6 19:52, Miklos Szeredi wrote: > > On Fri, Sep 6, 2019 at 12:36 PM Stefan Hajnoczi wrote: > >> > >> On Fri, Sep 06, 2019 at 10:15:14AM +0200, Miklos Szeredi wrote: > >>> On T

Re: [PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path

2019-09-09 Thread Stefan Hajnoczi
On Fri, Sep 06, 2019 at 09:51:31AM -0400, Vivek Goyal wrote: > On Fri, Sep 06, 2019 at 01:05:34PM +0100, Stefan Hajnoczi wrote: > > On Thu, Sep 05, 2019 at 03:48:57PM -0400, Vivek Goyal wrote: > > > It is possible that a mount is in progress and device is being removed at > &

Re: [PATCH 15/18] virtiofs: Make virtio_fs object refcounted

2019-09-09 Thread Stefan Hajnoczi
On Fri, Sep 06, 2019 at 09:50:32AM -0400, Vivek Goyal wrote: > On Fri, Sep 06, 2019 at 01:03:09PM +0100, Stefan Hajnoczi wrote: > > On Thu, Sep 05, 2019 at 03:48:56PM -0400, Vivek Goyal wrote: > > > This object is used both by fuse_connection as well virt device. So make

Re: [PATCH 08/18] virtiofs: Drain all pending requests during ->remove time

2019-09-09 Thread Stefan Hajnoczi
On Fri, Sep 06, 2019 at 10:18:49AM -0400, Michael S. Tsirkin wrote: > On Fri, Sep 06, 2019 at 10:17:05AM -0400, Vivek Goyal wrote: > > On Fri, Sep 06, 2019 at 11:52:10AM +0100, Stefan Hajnoczi wrote: > > > On Thu, Sep 05, 2019 at 03:48:49PM -0400, Vivek Goyal wrote: &g

Re: [PATCH 18/18] virtiofs: Remove TODO item from virtio_fs_free_devs()

2019-09-06 Thread Stefan Hajnoczi
ditional locking yet. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 17/18] virtiofs: Remove TODO to quiesce/end_requests

2019-09-06 Thread Stefan Hajnoczi
gned-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 16/18] virtiofs: Use virtio_fs_mutex for races w.r.t ->remove and mount path

2019-09-06 Thread Stefan Hajnoczi
instances. This is fine for now. Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 15/18] virtiofs: Make virtio_fs object refcounted

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:56PM -0400, Vivek Goyal wrote: > This object is used both by fuse_connection as well virt device. So make > this object reference counted and that makes it easy to define life cycle > of the object. > > Now deivce can be removed while filesystem is still mounted. This

Re: [PATCH 14/18] virtiofs: Add a fuse_iqueue operation to put() reference

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:55PM -0400, Vivek Goyal wrote: > diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h > index 85e2dcad68c1..04e2c000d63f 100644 > --- a/fs/fuse/fuse_i.h > +++ b/fs/fuse/fuse_i.h > @@ -479,6 +479,11 @@ struct fuse_iqueue_ops { >*/ > void (*wake_pending_and_unl

Re: [PATCH 13/18] virtiofs: Do not access virtqueue in request submission path

2019-09-06 Thread Stefan Hajnoczi
pointer deference. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 12/18] virtiofs: Use virtio_fs_free_devs() in error path

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:53PM -0400, Vivek Goyal wrote: > We already have an helper to cleanup fuse devices. Use that instead of > duplicating the code. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-)

Re: [PATCH 11/18] virtiofs: stop and drain queues after sending DESTROY

2019-09-06 Thread Stefan Hajnoczi
; just to be sure and then free up the devices. > > Given drain queues will call flush_work() on various workers, remove this > logic from virtio_free_devs(). > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 11 --- > 1 file changed, 8 insertions(+),

Re: [PATCH 10/18] virtiofs: Do not use device managed mem for virtio_fs and virtio_fs_vq

2019-09-06 Thread Stefan Hajnoczi
st reference to object is dropped. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 13 - > 1 file changed, 8 insertions(+), 5 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 09/18] virtiofs: Add an helper to start all the queues

2019-09-06 Thread Stefan Hajnoczi
tions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 08/18] virtiofs: Drain all pending requests during ->remove time

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:48:49PM -0400, Vivek Goyal wrote: > +static void virtio_fs_drain_queue(struct virtio_fs_vq *fsvq) > +{ > + WARN_ON(fsvq->in_flight < 0); > + > + /* Wait for in flight requests to finish.*/ > + while (1) { > + spin_lock(&fsvq->lock); > +

Re: [PATCH 06/18] virtiofs: ->remove should not clean virtiofs fuse devices

2019-09-06 Thread Stefan Hajnoczi
ld > stop queues and virtuques can go away. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 07/18] virtiofs: Stop virtiofs queues when device is being removed

2019-09-06 Thread Stefan Hajnoczi
fuse/virtio_fs.c | 14 ++ > 1 file changed, 14 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 05/18] Maintain count of in flight requests for VQ_REQUEST queue

2019-09-06 Thread Stefan Hajnoczi
.c | 4 > 1 file changed, 4 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 04/18] virtiofs: Check connected state for VQ_REQUEST queue as well

2019-09-06 Thread Stefan Hajnoczi
virtqueue is gone. In > that case ->connected will be false and request can't be submitted anymore > and user space will see error -ENOTCONN. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 6 ++ > 1 file changed, 6 insertions(+) Reviewed-by: St

Re: [PATCH 03/18] virtiofs: Pass fsvq instead of vq as parameter to virtio_fs_enqueue_req

2019-09-06 Thread Stefan Hajnoczi
been cleaned up by device ->remove code and we will > return error. > > Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 9 + > 1 file changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 02/18] virtiofs: Check whether hiprio queue is connected at submission time

2019-09-06 Thread Stefan Hajnoczi
tions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 01/18] virtiofs: Remove request from processing list before calling end

2019-09-06 Thread Stefan Hajnoczi
; Signed-off-by: Vivek Goyal > --- > fs/fuse/virtio_fs.c | 4 > 1 file changed, 4 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 00/18] virtiofs: Fix various races and cleanups round 1

2019-09-06 Thread Stefan Hajnoczi
On Fri, Sep 06, 2019 at 10:15:14AM +0200, Miklos Szeredi wrote: > On Thu, Sep 5, 2019 at 9:49 PM Vivek Goyal wrote: > > > > Hi, > > > > Michael Tsirkin pointed out issues w.r.t various locking related TODO > > items and races w.r.t device removal. > > > > In this first round of cleanups, I have ta

Re: [PATCH v4 15/16] virtio-fs: add virtiofs filesystem

2019-09-06 Thread Stefan Hajnoczi
On Thu, Sep 05, 2019 at 03:15:15PM -0400, Vivek Goyal wrote: > On Tue, Sep 03, 2019 at 09:55:49AM -0400, Michael S. Tsirkin wrote: > [..] > > What's with all of the TODOs? Some of these are really scary, > > looks like they need to be figured out before this is merged. > > Hi Michael, > > One of

Re: [PATCH v2] scsi: virtio_scsi: unplug LUNs when events missed

2019-09-06 Thread Stefan Hajnoczi
++ > 1 file changed, 33 insertions(+) Please include a changelog in future patch revisions. For example: Signed-off-by: ... --- v2: * Replaced magic constants with sd.h constants [Michael] Just C and virtio code review, no SCSI specifics: Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] fuse: reserve byteswapped init opcodes

2019-09-04 Thread Stefan Hajnoczi
gt; 1 file changed, 4 insertions(+) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v4 15/16] virtio-fs: add virtiofs filesystem

2019-09-04 Thread Stefan Hajnoczi
On Tue, Sep 03, 2019 at 09:55:49AM -0400, Michael S. Tsirkin wrote: > On Tue, Sep 03, 2019 at 01:42:02PM +0200, Miklos Szeredi wrote: > Endian-ness for fuse header also looks wrong. [...] > > +struct virtio_fs_forget { > > + struct fuse_in_header ih; > > + struct fuse_forget_in arg; > > These

Re: [PATCH v3 00/13] virtio-fs: shared file system for virtual machines

2019-09-04 Thread Stefan Hajnoczi
On Tue, Sep 03, 2019 at 11:17:35AM +0200, Miklos Szeredi wrote: > On Tue, Sep 3, 2019 at 10:31 AM Michael S. Tsirkin wrote: > > > > fs/fuse/Kconfig | 11 + > > > > fs/fuse/Makefile|1 + > > > > fs/fuse/control.c |4 +- > > > > fs/fuse/cuse.c

Re: [PATCH v4 1/5] vsock/virtio: limit the memory used per-socket

2019-09-02 Thread Stefan Hajnoczi
> > > This patch mitigates this issue copying the payload of small > > > > packets (< 128 bytes) into the buffer of last packet queued, in > > > > order to avoid wasting memory. > > > > > > > > Reviewed-by: Stefan Hajnoczi > > > > S

[PATCH] virtio-fs: add Documentation/filesystems/virtiofs.rst

2019-08-29 Thread Stefan Hajnoczi
Add information about the new "virtiofs" file system. Signed-off-by: Stefan Hajnoczi --- Documentation/filesystems/index.rst| 10 + Documentation/filesystems/virtiofs.rst | 60 ++ 2 files changed, 70 insertions(+) create mode 100644 Documentation/f

Re: [PATCH v3 00/13] virtio-fs: shared file system for virtual machines

2019-08-29 Thread Stefan Hajnoczi
On Thu, Aug 29, 2019 at 11:28:27AM +0200, Miklos Szeredi wrote: > On Wed, Aug 21, 2019 at 7:38 PM Vivek Goyal wrote: Thanks! > - removed option parsing completely. Virtiofs config is fixed to "-o > rootmode=04,user_id=0,group_id=0,allow_other,default_permissions". > Does this sound reasona

Re: [PATCH v2 11/11] vsock_test: wait for the remote to close the connection

2019-08-23 Thread Stefan Hajnoczi
On Thu, Aug 22, 2019 at 11:15:46AM +0200, Stefano Garzarella wrote: > On Tue, Aug 20, 2019 at 09:28:28AM +0100, Stefan Hajnoczi wrote: > > On Thu, Aug 01, 2019 at 05:25:41PM +0200, Stefano Garzarella wrote: > > > +/* Wait for the remote to close the connect

Re: [PATCH v2 10/11] vsock_test: skip read() in test_stream*close tests on a VMCI host

2019-08-20 Thread Stefan Hajnoczi
On Thu, Aug 01, 2019 at 05:25:40PM +0200, Stefano Garzarella wrote: > When VMCI transport is used, if the guest closes a connection, > all data is gone and EOF is returned, so we should skip the read > of data written by the peer before closing the connection. All transports should aim for identic

Re: [PATCH v2 11/11] vsock_test: wait for the remote to close the connection

2019-08-20 Thread Stefan Hajnoczi
On Thu, Aug 01, 2019 at 05:25:41PM +0200, Stefano Garzarella wrote: > +/* Wait for the remote to close the connection */ > +void vsock_wait_remote_close(int fd) > +{ > + struct epoll_event ev; > + int epollfd, nfds; > + > + epollfd = epoll_create1(0); > + if (epollfd == -1) { > +

Re: [PATCH v2 18/30] virtio_fs, dax: Set up virtio_fs dax_device

2019-07-29 Thread Stefan Hajnoczi
t;> On Thu, Jul 18, 2019 at 6:15 AM Vivek Goyal wrote: > >>>>>> > >>>>>>> > >>>>>>> On Wed, Jul 17, 2019 at 07:27:25PM +0200, Halil Pasic wrote: > >>>>>>>> On Wed, 15 May 2019 15:27:03 -0400 > >>

Re: [PATCH v4 0/5] vsock/virtio: optimizations to increase the throughput

2019-07-29 Thread Stefan Hajnoczi
On Mon, Jul 22, 2019 at 11:14:34AM +0200, Stefano Garzarella wrote: > On Mon, Jul 22, 2019 at 10:08:35AM +0100, Stefan Hajnoczi wrote: > > On Wed, Jul 17, 2019 at 01:30:25PM +0200, Stefano Garzarella wrote: > > > This series tries to increase the throughput of virtio

Re: [PATCH v4 0/5] vsock/virtio: optimizations to increase the throughput

2019-07-22 Thread Stefan Hajnoczi
On Wed, Jul 17, 2019 at 01:30:25PM +0200, Stefano Garzarella wrote: > This series tries to increase the throughput of virtio-vsock with slight > changes. > While I was testing the v2 of this series I discovered an huge use of memory, > so I added patch 1 to mitigate this issue. I put it in this ser

Re: [PATCH v4 5/5] vsock/virtio: change the maximum packet size allowed

2019-07-22 Thread Stefan Hajnoczi
ed-off-by: Stefano Garzarella > --- > net/vmw_vsock/virtio_transport_common.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers

2019-07-22 Thread Stefan Hajnoczi
ream sockets. > > Signed-off-by: Stefano Garzarella > --- > drivers/vhost/vsock.c | 66 ++--- > net/vmw_vsock/virtio_transport_common.c | 15 -- > 2 files changed, 60 insertions(+), 21 deletions(-) Reviewed-by: Stefan Hajnoczi

Re: [PATCH v4 3/5] vsock/virtio: fix locking in virtio_transport_inc_tx_pkt()

2019-07-22 Thread Stefan Hajnoczi
--- > include/linux/virtio_vsock.h| 2 +- > net/vmw_vsock/virtio_transport_common.c | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v4 2/5] vsock/virtio: reduce credit update messages

2019-07-22 Thread Stefan Hajnoczi
gt; --- > include/linux/virtio_vsock.h| 1 + > net/vmw_vsock/virtio_transport_common.c | 16 +--- > 2 files changed, 14 insertions(+), 3 deletions(-) It's an arbitrary limit but the risk of regressions is low since the credit update traffic was so excessiv

Re: [PATCH 1/2] scsi_host: add support for request batching

2019-07-05 Thread Stefan Hajnoczi
On Fri, Jul 05, 2019 at 09:12:37AM +0200, Hannes Reinecke wrote: > On 7/4/19 3:19 PM, Paolo Bonzini wrote: > > On 19/06/19 12:31, Paolo Bonzini wrote: > >>> I'm a bit unsure if 'bd->last' is always set; it's quite obvious that > >>> it's present if set, but what about requests with 'bd->last == fal

Re: [PATCH v2 1/3] vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock

2019-07-04 Thread Stefan Hajnoczi
On Wed, Jul 03, 2019 at 12:41:35PM +0200, Stefano Garzarella wrote: > On Wed, Jul 03, 2019 at 05:53:58PM +0800, Jason Wang wrote: > > On 2019/6/28 下午8:36, Stefano Garzarella wrote: > > Another more interesting question, I believe we will do singleton for > > virtio_vsock structure. Then what's the

Re: [PATCH v2 0/3] vsock/virtio: several fixes in the .probe() and .remove()

2019-07-03 Thread Stefan Hajnoczi
On Mon, Jul 01, 2019 at 07:03:57PM +0200, Stefano Garzarella wrote: > On Mon, Jul 01, 2019 at 04:11:13PM +0100, Stefan Hajnoczi wrote: > > On Fri, Jun 28, 2019 at 02:36:56PM +0200, Stefano Garzarella wrote: > > > During the review of "[PATCH] vsock/virtio: Initialize core vi

Re: [PATCH] scsi: virtio_scsi: Use struct_size() helper

2019-07-01 Thread Stefan Hajnoczi
csi) + sizeof(vscsi->req_vqs[0]) * num_queues > > with: > > struct_size(vscsi, req_vqs, num_queues) > > This code was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva > --- > drivers/scsi/virtio_scsi.c | 2 +- > 1 file changed, 1 inser

Re: [PATCH v2 0/3] vsock/virtio: several fixes in the .probe() and .remove()

2019-07-01 Thread Stefan Hajnoczi
On Fri, Jun 28, 2019 at 02:36:56PM +0200, Stefano Garzarella wrote: > During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock > before registering the driver", Stefan pointed out some possible issues > in the .probe() and .remove() callbacks of the virtio-vsock driver. > > This se

Re: [PATCH v2 1/3] vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock

2019-07-01 Thread Stefan Hajnoczi
On Fri, Jun 28, 2019 at 02:36:57PM +0200, Stefano Garzarella wrote: > Some callbacks used by the upper layers can run while we are in the > .remove(). A potential use-after-free can happen, because we free > the_virtio_vsock without knowing if the callbacks are over or not. > > To solve this issue

Re: [PATCH v2 3/3] vsock/virtio: fix flush of works during the .remove()

2019-07-01 Thread Stefan Hajnoczi
On Fri, Jun 28, 2019 at 02:36:59PM +0200, Stefano Garzarella wrote: > This patch moves the flush of works after vdev->config->del_vqs(vdev), > because we need to be sure that no workers run before to free the > 'vsock' object. > > Since we stopped the workers using the [tx|rx|event]_run flags, > w

Re: [PATCH v2 3/3] vsock/virtio: fix flush of works during the .remove()

2019-07-01 Thread Stefan Hajnoczi
On Fri, Jun 28, 2019 at 02:36:59PM +0200, Stefano Garzarella wrote: > This patch moves the flush of works after vdev->config->del_vqs(vdev), > because we need to be sure that no workers run before to free the > 'vsock' object. > > Since we stopped the workers using the [tx|rx|event]_run flags, > w

Re: [PATCH v2 1/3] vsock/virtio: use RCU to avoid use-after-free on the_virtio_vsock

2019-07-01 Thread Stefan Hajnoczi
On Fri, Jun 28, 2019 at 02:36:57PM +0200, Stefano Garzarella wrote: > Some callbacks used by the upper layers can run while we are in the > .remove(). A potential use-after-free can happen, because we free > the_virtio_vsock without knowing if the callbacks are over or not. > > To solve this issue

Re: [PATCH v3 1/5] vsock/virtio: limit the memory used per-socket

2019-06-10 Thread Stefan Hajnoczi
++ > 4 files changed, 55 insertions(+), 9 deletions(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 0/4] vsock/virtio: several fixes in the .probe() and .remove()

2019-06-10 Thread Stefan Hajnoczi
On Tue, May 28, 2019 at 12:56:19PM +0200, Stefano Garzarella wrote: > During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock > before registering the driver", Stefan pointed out some possible issues > in the .probe() and .remove() callbacks of the virtio-vsock driver. > > This se

Re: [PATCH 0/2] scsi: add support for request batching

2019-06-10 Thread Stefan Hajnoczi
| 16 +-- > 4 files changed, 89 insertions(+), 20 deletions(-) > > -- > 2.21.0 > Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] virtio/virtio_ring: do some comment fixes

2019-05-23 Thread Stefan Hajnoczi
ed, 14 insertions(+), 13 deletions(-) Reviewed-by: Stefan Hajnoczi

Re: [PATCH v2 1/8] vsock/virtio: limit the memory used per-socket

2019-05-20 Thread Stefan Hajnoczi
On Fri, May 17, 2019 at 10:25:05AM +0200, Stefano Garzarella wrote: > On Thu, May 16, 2019 at 04:25:33PM +0100, Stefan Hajnoczi wrote: > > On Fri, May 10, 2019 at 02:58:36PM +0200, Stefano Garzarella wrote: > > > +static struct virtio_vsock_buf * > > > +virtio

Re: [PATCH v2 12/30] dax: remove block device dependencies

2019-05-16 Thread Stefan Hajnoczi
On Wed, May 15, 2019 at 05:21:51PM -0700, Dan Williams wrote: > On Wed, May 15, 2019 at 12:28 PM Vivek Goyal wrote: > > > > From: Stefan Hajnoczi > > > > Although struct dax_device itself is not tied to a block device, some > > DAX code assumes there is a

Re: [PATCH v2 00/10] RFC: NVME MDEV

2019-05-09 Thread Stefan Hajnoczi
On Mon, May 06, 2019 at 12:04:06PM +0300, Maxim Levitsky wrote: > On top of that, it is expected that newer hardware will support the PASID > based > device subdivision, which will allow us to _directly_ pass through the > submission queues of the device and _force_ us to use the NVME protocol for

Re: [PATCH RFC 0/4] vsock/virtio: optimizations to increase the throughput

2019-04-08 Thread Stefan Hajnoczi
On Fri, Apr 05, 2019 at 09:49:17AM +0200, Stefano Garzarella wrote: > On Thu, Apr 04, 2019 at 02:04:10PM -0400, Michael S. Tsirkin wrote: > > On Thu, Apr 04, 2019 at 06:47:15PM +0200, Stefano Garzarella wrote: > > > On Thu, Apr 04, 2019 at 11:52:46AM -0400, Michael S. Tsirkin wrote: > > > > I simpl

Re: [PATCH] vhost/vsock: initialize vhost_vsock->hash

2019-04-05 Thread Stefan Hajnoczi
t_vsock_dev_open(struct inode *inode, > struct file *file) > spin_lock_init(&vsock->send_pkt_list_lock); > INIT_LIST_HEAD(&vsock->send_pkt_list); > vhost_work_init(&vsock->send_pkt_work, vhost_transport_send_pkt_work); > + INIT_HLIST_NODE(&a

Re: [PATCH] vhost: zero vhost_vsock memory on allocation

2019-03-28 Thread Stefan Hajnoczi
On Wed, Mar 27, 2019 at 01:08:53PM -0400, Vitaly Mayatskih wrote: > On Wed, Mar 27, 2019 at 12:49 PM Stefan Hajnoczi wrote: > > > Which field was accessed before initialization? > > > > I ask because the situation is now unclear since code remains that > > assumes v

Re: [PATCH v2] MAiNTAINERS: add Paolo, Stefan for virtio blk/scsi

2019-03-28 Thread Stefan Hajnoczi
> - use R tag for new reviewers > - readd Jason as M > > MAINTAINERS | 15 ++- > 1 file changed, 14 insertions(+), 1 deletion(-) Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] vhost: zero vhost_vsock memory on allocation

2019-03-27 Thread Stefan Hajnoczi
On Tue, Mar 26, 2019 at 08:56:14PM -0400, Vitaly Mayatskikh wrote: > This fixes OOPS when using under-initialized vhost_vsock object. > > The code had a combo of kzalloc plus vmalloc as a fallback > initially, but it has been replaced by plain kvmalloc in > commit 6c5ab6511f71 ("mm: support __GFP_

Re: [PATCH 0/9] RFC: NVME VFIO mediated device [BENCHMARKS]

2019-03-26 Thread Stefan Hajnoczi
On Mon, Mar 25, 2019 at 08:52:32PM +0200, Maxim Levitsky wrote: > Hi > > This is first round of benchmarks. > > The system is Intel(R) Xeon(R) Gold 6128 CPU @ 3.40GHz > > The system has 2 numa nodes, but only cpus and memory from node 0 were used to > avoid noise from numa. > > The SSD is Intel

Re: your mail

2019-03-25 Thread Stefan Hajnoczi
On Thu, Mar 21, 2019 at 07:07:38PM +0200, Maxim Levitsky wrote: > On Thu, 2019-03-21 at 16:13 +0000, Stefan Hajnoczi wrote: > > On Tue, Mar 19, 2019 at 04:41:07PM +0200, Maxim Levitsky wrote: > > > Date: Tue, 19 Mar 2019 14:45:45 +0200 > > > Subject: [PATCH 0/9] RFC

Re: your mail

2019-03-21 Thread Stefan Hajnoczi
On Tue, Mar 19, 2019 at 04:41:07PM +0200, Maxim Levitsky wrote: > Date: Tue, 19 Mar 2019 14:45:45 +0200 > Subject: [PATCH 0/9] RFC: NVME VFIO mediated device > > Hi everyone! > > In this patch series, I would like to introduce my take on the problem of > doing > as fast as possible virtualizati

Re:

2019-03-21 Thread Stefan Hajnoczi
On Wed, Mar 20, 2019 at 09:08:37PM +0200, Maxim Levitsky wrote: > On Wed, 2019-03-20 at 11:03 +, Felipe Franciosi wrote: > > > On Mar 19, 2019, at 2:41 PM, Maxim Levitsky wrote: > > > > > > Date: Tue, 19 Mar 2019 14:45:45 +0200 > > > Subject: [PATCH 0/9] RFC: NVME VFIO mediated device > > >

Re: [PATCH 7/9] nvme/core: add mdev interfaces

2019-03-20 Thread Stefan Hajnoczi
On Tue, Mar 19, 2019 at 04:41:14PM +0200, Maxim Levitsky wrote: > +int nvme_core_register_mdev_driver(struct nvme_mdev_driver *driver_ops) > +{ > + struct nvme_ctrl *ctrl; > + > + if (mdev_driver_interface) > + return -EEXIST; > + > + mdev_driver_interface = driver_ops; Can

Re: [PATCH v2] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-03-07 Thread Stefan Hajnoczi
fb_sys_fops virtio_net psmouse drm net_failover pata_acpi > virtio_blk failover floppy > > Fixes: 22b5c0b63f32 ("vsock/virtio: fix kernel panic after device hot-unplug") > Reported-by: Alexandru Herghelegiu > Signed-off-by: Adalbert Lazăr > Co-developed-by: Stefan Hajnoczi > --- > net/vmw_vsock/virtio_transport_common.c | 22 +++--- > 1 file changed, 15 insertions(+), 7 deletions(-) Excellent, thanks! Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-03-06 Thread Stefan Hajnoczi
On Wed, Mar 06, 2019 at 11:10:41AM +0200, Adalbert Lazăr wrote: > On Wed, 6 Mar 2019 08:41:04 +0000, Stefan Hajnoczi wrote: > > On Tue, Mar 05, 2019 at 08:01:45PM +0200, Adalbert Lazăr wrote: > > The pkt argument is the received packet that we must reply to. > > The reply pac

Re: [PATCH] vsock/virtio: fix kernel panic from virtio_transport_reset_no_sock

2019-03-06 Thread Stefan Hajnoczi
On Tue, Mar 05, 2019 at 08:01:45PM +0200, Adalbert Lazăr wrote: Thanks for the patch, Adalbert! Please add a Signed-off-by tag so your patch can be merged (see Documentation/process/submitting-patches.rst Chapter 11 for details on the Developer's Certificate of Origin). > static int virtio_tran

Re: [PATCH net] vhost: fix OOB in get_rx_bufs()

2019-01-28 Thread Stefan Hajnoczi
/scsi.c | 2 +- > drivers/vhost/vhost.c | 7 --- > drivers/vhost/vhost.h | 4 +++- > drivers/vhost/vsock.c | 2 +- > 5 files changed, 11 insertions(+), 7 deletions(-) No change in the scsi and vsock cases. I haven't reviewed the net case. Acked-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH] vhost/vsock: fix vhost vsock cid hashing inconsistent

2019-01-08 Thread Stefan Hajnoczi
by: Zha Bin > Reviewed-by: Liu Jiang > --- > drivers/vhost/vsock.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks for tracking this down! Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH 18/52] virtio-fs: Map cache using the values from the capabilities

2019-01-02 Thread Stefan Hajnoczi
On Tue, Dec 18, 2018 at 06:25:27PM +0100, David Hildenbrand wrote: > On 18.12.18 18:13, Cornelia Huck wrote: > > On Mon, 17 Dec 2018 14:56:38 + > > Stefan Hajnoczi wrote: > > > >> On Mon, Dec 17, 2018 at 11:53:46AM +0100, David Hildenbrand wrote: > >&

Re: [PATCH 18/52] virtio-fs: Map cache using the values from the capabilities

2018-12-17 Thread Stefan Hajnoczi
On Mon, Dec 17, 2018 at 11:53:46AM +0100, David Hildenbrand wrote: > On 14.12.18 14:44, Stefan Hajnoczi wrote: > > On Thu, Dec 13, 2018 at 01:38:23PM +0100, Cornelia Huck wrote: > >> On Thu, 13 Dec 2018 13:24:31 +0100 > >> David Hildenbrand wrote: > >> >

Re: [PATCH 18/52] virtio-fs: Map cache using the values from the capabilities

2018-12-17 Thread Stefan Hajnoczi
On Fri, Dec 14, 2018 at 02:50:58PM +0100, Cornelia Huck wrote: > On Fri, 14 Dec 2018 13:44:34 + > Stefan Hajnoczi wrote: > > > On Thu, Dec 13, 2018 at 01:38:23PM +0100, Cornelia Huck wrote: > > > On Thu, 13 Dec 2018 13:24:31 +0100 > > > David Hildenbrand wr

Re: [PATCH 18/52] virtio-fs: Map cache using the values from the capabilities

2018-12-14 Thread Stefan Hajnoczi
On Thu, Dec 13, 2018 at 01:38:23PM +0100, Cornelia Huck wrote: > On Thu, 13 Dec 2018 13:24:31 +0100 > David Hildenbrand wrote: > > > On 13.12.18 13:15, Dr. David Alan Gilbert wrote: > > > * David Hildenbrand (da...@redhat.com) wrote: > > >> On 13.12.18 11:00, Dr. David Alan Gilbert wrote: > >

Re: [PATCH 15/52] fuse: map virtio_fs DAX window BAR

2018-12-13 Thread Stefan Hajnoczi
On Wed, Dec 12, 2018 at 05:37:35PM +0100, Christian Borntraeger wrote: > > > On 10.12.2018 18:12, Vivek Goyal wrote: > > From: Stefan Hajnoczi > > > +static int virtio_fs_setup_dax(struct virtio_device *vdev, struct > > virtio_fs *fs) > > +{ > &

Re: [PATCH 00/52] [RFC] virtio-fs: shared file system for virtual machines

2018-12-11 Thread Stefan Hajnoczi
On Mon, Dec 10, 2018 at 12:12:26PM -0500, Vivek Goyal wrote: > Hi, > > Here are RFC patches for virtio-fs. Looking for feedback on this approach. > > These patches should apply on top of 4.20-rc5. We have also put code for > various components here. > > https://gitlab.com/virtio-fs A draft spec

Re: [PATCH] MAINTAINERS: remove reference to bogus vsock file

2018-10-22 Thread Stefan Hajnoczi
On Fri, Oct 12, 2018 at 04:46:37PM +0100, Stefan Hajnoczi wrote: > The file drivers/vhost/vsock.h never existed. Remove the bogus > MAINTAINERS reference. > > Fixes: 433fc58e6bf2c8bd97e57153ed28e64fd78207b8 ("VSOCK: Introduce > vhost_vsock.ko") > Reported-by:

Re: [PATCH V5 0/3] introduce coalesced pio support

2018-10-17 Thread Stefan Hajnoczi
On Sun, Oct 14, 2018 at 07:09:54AM +0800, Peng Hao wrote: > Coalesced pio is based on coalesced mmio and can be used for some port > like rtc port, pci-host config port and so on. > > Specially in case of rtc as coalesced pio, some versions of windows guest > access rtc frequently because of rtc a

Re: Bad MAINTAINERS pattern in section 'VIRTIO AND VHOST VSOCK DRIVER'

2018-10-12 Thread Stefan Hajnoczi
On Fri, Sep 28, 2018 at 03:05:26PM -0700, Joe Perches wrote: > Please fix this defect appropriately. > > linux-next MAINTAINERS section: > > 15660 VIRTIO AND VHOST VSOCK DRIVER > 15661 M: Stefan Hajnoczi > 15662 L: k...@vger.kernel.

[PATCH] MAINTAINERS: remove reference to bogus vsock file

2018-10-12 Thread Stefan Hajnoczi
The file drivers/vhost/vsock.h never existed. Remove the bogus MAINTAINERS reference. Fixes: 433fc58e6bf2c8bd97e57153ed28e64fd78207b8 ("VSOCK: Introduce vhost_vsock.ko") Reported-by: Joe Perches Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) di

Re: [PATCH V4 2/2] kvm/x86 : add document for coalesced pio

2018-10-12 Thread Stefan Hajnoczi
On Fri, Aug 31, 2018 at 12:17:21AM +0800, Peng Hao wrote: > Signed-off-by: Peng Hao > --- > Documentation/virtual/kvm/00-INDEX | 2 ++ > Documentation/virtual/kvm/coalesced-pio.txt | 15 +++ > 2 files changed, 17 insertions(+) > create mode 100644 Documentation/virtual/kvm/

<    1   2   3   4   5   >