Re: [RFC PATCH 0/7] Untrusted device support for virtio

2021-04-21 Thread Christoph Hellwig
On Wed, Apr 21, 2021 at 11:21:10AM +0800, Jason Wang wrote: > The behaivor for non DMA API is kept for minimizing the performance > impact. NAK. Everyone should be using the DMA API in a modern world. So treating the DMA API path worse than the broken legacy path does not make any sense whatsoev

Re: [PATCH] vdpa/mlx5: Add support for doorbell bypassing

2021-04-21 Thread Jason Wang
在 2021/4/22 上午11:27, Mika Penttilä 写道: On 22.4.2021 5.37, Jason Wang wrote: 在 2021/4/21 下午6:41, Eli Cohen 写道: Implement mlx5_get_vq_notification() to return the doorbell address. Size is set to one system page as required. Signed-off-by: Eli Cohen ---   drivers/vdpa/mlx5/core/mlx5_vdpa.h

Re: [PATCH] vdpa/mlx5: Add support for doorbell bypassing

2021-04-21 Thread Jason Wang
在 2021/4/21 下午6:41, Eli Cohen 写道: Implement mlx5_get_vq_notification() to return the doorbell address. Size is set to one system page as required. Signed-off-by: Eli Cohen --- drivers/vdpa/mlx5/core/mlx5_vdpa.h | 1 + drivers/vdpa/mlx5/core/resources.c | 1 + drivers/vdpa/mlx5/net/mlx5_vne

Re: [PATCH] fuse: Avoid potential use after free

2021-04-21 Thread Al Viro
On Tue, Apr 06, 2021 at 06:53:32PM -0500, Aditya Pakki wrote: > In virtio_fs_get_tree, after fm is freed, it is again freed in case > s_root is NULL and virtio_fs_fill_super() returns an error. To avoid > a double free, set fm to NULL. > > Signed-off-by: Aditya Pakki > --- > fs/fuse/virtio_fs.c

Re: [PATCH] fuse: Avoid potential use after free

2021-04-21 Thread Krzysztof Kozlowski
On Wed, 7 Apr 2021 at 23:25, Vivek Goyal wrote: > > On Tue, Apr 06, 2021 at 06:53:32PM -0500, Aditya Pakki wrote: > > In virtio_fs_get_tree, after fm is freed, it is again freed in case > > s_root is NULL and virtio_fs_fill_super() returns an error. To avoid > > a double free, set fm to NULL. > >

Re: [virtio-comment] Re: [RFC PATCH v5 2/2] virtio-vsock: SOCK_SEQPACKET description

2021-04-21 Thread Stefano Garzarella
On Wed, Apr 21, 2021 at 04:24:36AM -0400, Michael S. Tsirkin wrote: On Wed, Apr 21, 2021 at 09:45:23AM +0200, Stefano Garzarella wrote: On Wed, Apr 14, 2021 at 09:04:47AM +0300, Arseny Krasnov wrote: > > On 13.04.2021 22:55, Michael S. Tsirkin wrote: > > On Tue, Apr 13, 2021 at 05:22:44PM +0300,

Re: [RFC PATCH v8 00/19] virtio/vsock: introduce SOCK_SEQPACKET support

2021-04-21 Thread Stefano Garzarella
On Tue, Apr 13, 2021 at 03:39:51PM +0300, Arseny Krasnov wrote: This patchset implements support of SOCK_SEQPACKET for virtio transport. As SOCK_SEQPACKET guarantees to save record boundaries, so to do it, new bit for field 'flags' was added: SEQ_EOR. This bit is set to 1 in last

Re: [RFC PATCH v8 19/19] af_vsock: serialize writes to shared socket

2021-04-21 Thread Stefano Garzarella
On Wed, Apr 14, 2021 at 01:51:17PM +0300, Arseny Krasnov wrote: On 13.04.2021 15:47, Arseny Krasnov wrote: This add logic, that serializes write access to single socket by multiple threads. It is implemented be adding field with TID of current writer. When writer tries to send something, it che

Re: [RFC PATCH v8 17/19] vsock_test: add SOCK_SEQPACKET tests

2021-04-21 Thread Stefano Garzarella
On Tue, Apr 13, 2021 at 03:46:58PM +0300, Arseny Krasnov wrote: This adds test of SOCK_SEQPACKET socket: it transfer data and then tests MSG_TRUNC flag. Cases for connect(), bind(), etc. are not tested, because it is same as for stream socket. Signed-off-by: Arseny Krasnov --- v7 -> v8: - Test

Re: [RFC PATCH v8 16/19] vsock/loopback: enable SEQPACKET for transport

2021-04-21 Thread Stefano Garzarella
On Tue, Apr 13, 2021 at 03:46:39PM +0300, Arseny Krasnov wrote: This adds SEQPACKET ops for loopback transport and 'seqpacket_allow()' callback. Signed-off-by: Arseny Krasnov Reviewed-by: Stefano Garzarella --- net/vmw_vsock/vsock_loopback.c | 12 1 file changed, 12 insertions(+)

Re: [RFC PATCH v8 15/19] vhost/vsock: enable SEQPACKET for transport

2021-04-21 Thread Stefano Garzarella
On Tue, Apr 13, 2021 at 03:46:18PM +0300, Arseny Krasnov wrote: This removes: 1) Ignore of non-stream type of packets. This adds: 1) Handling of SEQPACKET bit: if guest sets features with this bit cleared, then SOCK_SEQPACKET support will be disabled. 2) 'seqpacket_allow()' callback. 3) Handlin

Re: [RFC PATCH v8 14/19] virtio/vsock: enable SEQPACKET for transport

2021-04-21 Thread Stefano Garzarella
On Tue, Apr 13, 2021 at 03:45:49PM +0300, Arseny Krasnov wrote: This adds 1) SEQPACKET ops for virtio transport and 'seqpacket_allow()' callback. 2) Handling of SEQPACKET bit: guest tries to negotiate it with vhost. Signed-off-by: Arseny Krasnov --- v7 -> v8: - This patch merged with patch whic

Re: [RFC PATCH v8 13/19] virtio/vsock: rest of SOCK_SEQPACKET support

2021-04-21 Thread Stefano Garzarella
On Tue, Apr 13, 2021 at 03:45:25PM +0300, Arseny Krasnov wrote: >This adds rest of logic for SEQPACKET: >1) Send SHUTDOWN on socket close for SEQPACKET type. >2) Set SEQPACKET packet type during send. >3) 'seqpacket_allow' flag to virtio transport. >4) Set 'VIRTIO_VSOCK_SEQ_EOR' bit in flags for la

Re: [RFC PATCH v8 11/19] virtio/vsock: dequeue callback for SOCK_SEQPACKET

2021-04-21 Thread Stefano Garzarella
On Tue, Apr 13, 2021 at 03:44:40PM +0300, Arseny Krasnov wrote: >This adds transport callback and it's logic for SEQPACKET dequeue. >Callback fetches RW packets from rx queue of socket until whole record >is copied(if user's buffer is full, user is not woken up). This is done >to not stall sender,

Re: [RFC PATCH v8 04/19] af_vsock: implement SEQPACKET receive loop

2021-04-21 Thread Stefano Garzarella
On Tue, Apr 13, 2021 at 03:42:47PM +0300, Arseny Krasnov wrote: This adds receive loop for SEQPACKET. It looks like receive loop for STREAM, but there is a little bit difference: 1) It doesn't call notify callbacks. 2) It doesn't care about 'SO_SNDLOWAT' and 'SO_RCVLOWAT' values, because there

Re: [virtio-comment] Re: [RFC PATCH v5 2/2] virtio-vsock: SOCK_SEQPACKET description

2021-04-21 Thread Michael S. Tsirkin
On Wed, Apr 21, 2021 at 09:45:23AM +0200, Stefano Garzarella wrote: > On Wed, Apr 14, 2021 at 09:04:47AM +0300, Arseny Krasnov wrote: > > > > On 13.04.2021 22:55, Michael S. Tsirkin wrote: > > > On Tue, Apr 13, 2021 at 05:22:44PM +0300, Arseny Krasnov wrote: > > > > On 13.04.2021 16:10, Michael S.

Re: [RFC PATCH] vdpa: mandate 1.0 device

2021-04-21 Thread Jason Wang
在 2021/4/21 下午4:03, Michael S. Tsirkin 写道: On Wed, Apr 21, 2021 at 03:41:36PM +0800, Jason Wang wrote: 在 2021/4/12 下午5:23, Jason Wang 写道: 在 2021/4/12 下午5:09, Michael S. Tsirkin 写道: On Mon, Apr 12, 2021 at 02:35:07PM +0800, Jason Wang wrote: 在 2021/4/10 上午12:04, Michael S. Tsirkin 写道: On Fri

Re: [RFC PATCH] vdpa: mandate 1.0 device

2021-04-21 Thread Michael S. Tsirkin
On Wed, Apr 21, 2021 at 03:41:36PM +0800, Jason Wang wrote: > > 在 2021/4/12 下午5:23, Jason Wang 写道: > > > > 在 2021/4/12 下午5:09, Michael S. Tsirkin 写道: > > > On Mon, Apr 12, 2021 at 02:35:07PM +0800, Jason Wang wrote: > > > > 在 2021/4/10 上午12:04, Michael S. Tsirkin 写道: > > > > > On Fri, Apr 09, 202

Re: [Virtio-fs] [PATCH] virtiofs: propagate sync() to file server

2021-04-21 Thread Greg Kurz
On Tue, 20 Apr 2021 14:42:26 -0400 Vivek Goyal wrote: > On Mon, Apr 19, 2021 at 05:08:48PM +0200, Greg Kurz wrote: > > Even if POSIX doesn't mandate it, linux users legitimately expect > > sync() to flush all data and metadata to physical storage when it > > is located on the same system. This is

Re: [RFC PATCH v5 2/2] virtio-vsock: SOCK_SEQPACKET description

2021-04-21 Thread Stefano Garzarella
On Wed, Apr 14, 2021 at 09:04:47AM +0300, Arseny Krasnov wrote: On 13.04.2021 22:55, Michael S. Tsirkin wrote: On Tue, Apr 13, 2021 at 05:22:44PM +0300, Arseny Krasnov wrote: On 13.04.2021 16:10, Michael S. Tsirkin wrote: On Tue, Apr 13, 2021 at 03:53:29PM +0300, Arseny Krasnov wrote: This a

Re: [RFC PATCH] vdpa: mandate 1.0 device

2021-04-21 Thread Jason Wang
在 2021/4/12 下午5:23, Jason Wang 写道: 在 2021/4/12 下午5:09, Michael S. Tsirkin 写道: On Mon, Apr 12, 2021 at 02:35:07PM +0800, Jason Wang wrote: 在 2021/4/10 上午12:04, Michael S. Tsirkin 写道: On Fri, Apr 09, 2021 at 12:47:55PM +0800, Jason Wang wrote: 在 2021/4/8 下午11:59, Michael S. Tsirkin 写道: On Th

Re: [PATCH] drm/bochs: Add screen blanking support

2021-04-21 Thread Gerd Hoffmann
> > However, a tricky part is that the QEMU vga code does treat VGA_ATT_IW > > register always as "flip-flop"; the first write is for index and the > > second write is for the data like palette. Meanwhile, in the current > > bochs DRM driver, the flip-flop wasn't considered, and it calls only > >