Re: [virtio-dev] Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-03-02 Thread Jason Wang
On 2021/3/2 8:08 下午, Cornelia Huck wrote: On Mon, 1 Mar 2021 11:51:08 +0800 Jason Wang wrote: On 2021/3/1 5:25 上午, Michael S. Tsirkin wrote: On Fri, Feb 26, 2021 at 04:19:16PM +0800, Jason Wang wrote: On 2021/2/26 2:53 上午, Michael S. Tsirkin wrote: Confused. What is wrong with the above? I

RE: [PATCH linux-next 7/9] vdpa/mlx5: Provide device generated random MAC address

2021-03-02 Thread Parav Pandit
Hi Eli, > From: Eli Cohen > Sent: Tuesday, March 2, 2021 11:09 AM > > On Mon, Mar 01, 2021 at 11:12:33AM -0500, Michael S. Tsirkin wrote: > > On Mon, Mar 01, 2021 at 03:19:51PM +0200, Eli Cohen wrote: > > > On Mon, Mar 01, 2021 at 08:09:48AM -0500, Michael S. Tsirkin wrote: > > > > On Mon, Mar 0

Re: [RFC PATCH v5 19/19] virtio/vsock: update trace event for SEQPACKET

2021-03-02 Thread Steven Rostedt
On Thu, 18 Feb 2021 08:42:15 +0300 Arseny Krasnov wrote: Not sure if this was pulled in yet, but I do have a small issue with this patch. > @@ -69,14 +82,19 @@ TRACE_EVENT(virtio_transport_alloc_pkt, > __entry->type = type; > __entry->op = op; > __entry-

Re: [PATCH 6/7] x86/boot/compressed/64: Check SEV encryption in 32-bit boot-path

2021-03-02 Thread Borislav Petkov
On Wed, Feb 10, 2021 at 11:21:34AM +0100, Joerg Roedel wrote: > + /* > + * Store the sme_me_mask as an indicator that SEV is active. It will be > + * set again in startup_64(). So why bother? Or does something needs it before that? ... > +SYM_FUNC_START(sev_startup32_cbit_check) s

[PATCH v7 1/9] uapi: virtio_ids: add a sound device type ID from OASIS spec

2021-03-02 Thread Anton Yakovlev
The OASIS virtio spec defines a sound device type ID that is not present in the header yet. Signed-off-by: Anton Yakovlev --- include/uapi/linux/virtio_ids.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/virtio_ids.h b/include/uapi/linux/virtio_ids.h index bc1c0621f5ed..

[PATCH v7 2/9] ALSA: virtio: add virtio sound driver

2021-03-02 Thread Anton Yakovlev
Introduce skeleton of the virtio sound driver. The driver implements the virtio sound device specification, which has become part of the virtio standard. Initial initialization of the device, virtqueues and creation of an empty ALSA sound device. Signed-off-by: Anton Yakovlev --- MAINTAINERS

[PATCH v7 3/9] ALSA: virtio: handling control messages

2021-03-02 Thread Anton Yakovlev
The control queue can be used by different parts of the driver to send commands to the device. Control messages can be either synchronous or asynchronous. The lifetime of a message is controlled by a reference count. Introduce a module parameter to set the message completion timeout: msg_timeout

[PATCH v7 0/9] ALSA: add virtio sound driver

2021-03-02 Thread Anton Yakovlev
This series implements a driver part of the virtio sound device specification v8 [1]. The driver supports PCM playback and capture substreams, jack and channel map controls. A message-based transport is used to write/read PCM frames to/from a device. As a device part was used OpenSynergy propriet

[PATCH v7 9/9] ALSA: virtio: introduce device suspend/resume support

2021-03-02 Thread Anton Yakovlev
All running PCM substreams are stopped on device suspend and restarted on device resume. Signed-off-by: Anton Yakovlev --- sound/virtio/virtio_card.c| 56 +++ sound/virtio/virtio_pcm.h | 3 ++ sound/virtio/virtio_pcm_ops.c | 33 - 3 fi

[PATCH v7 8/9] ALSA: virtio: introduce PCM channel map support

2021-03-02 Thread Anton Yakovlev
Enumerate all available PCM channel maps and create ALSA controls. Signed-off-by: Anton Yakovlev --- sound/virtio/Makefile | 1 + sound/virtio/virtio_card.c | 10 ++ sound/virtio/virtio_card.h | 8 ++ sound/virtio/virtio_chmap.c | 219 sound/virt

[PATCH v7 7/9] ALSA: virtio: introduce jack support

2021-03-02 Thread Anton Yakovlev
Enumerate all available jacks and create ALSA controls. At the moment jacks have a simple implementation and can only be used to receive notifications about a plugged in/out device. Signed-off-by: Anton Yakovlev --- sound/virtio/Makefile | 1 + sound/virtio/virtio_card.c | 14 +++ sound

[PATCH v7 6/9] ALSA: virtio: PCM substream operators

2021-03-02 Thread Anton Yakovlev
Introduce the operators required for the operation of substreams. Signed-off-by: Anton Yakovlev --- sound/virtio/Makefile | 3 +- sound/virtio/virtio_pcm.c | 2 + sound/virtio/virtio_pcm.h | 5 + sound/virtio/virtio_pcm_ops.c | 445 ++ 4 file

[PATCH v7 5/9] ALSA: virtio: handling control and I/O messages for the PCM device

2021-03-02 Thread Anton Yakovlev
The driver implements a message-based transport for I/O substream operations. Before the start of the substream, the hardware buffer is sliced into I/O messages, the number of which is equal to the current number of periods. The size of each message is equal to the current size of one period. I/O

[PATCH v7 4/9] ALSA: virtio: build PCM devices and substream hardware descriptors

2021-03-02 Thread Anton Yakovlev
Like the HDA specification, the virtio sound device specification links PCM substreams, jacks and PCM channel maps into functional groups. For each discovered group, a PCM device is created, the number of which coincides with the group number. Introduce the module parameters for setting the hardwa

Re: [PATCH v6 9/9] ALSA: virtio: introduce device suspend/resume support

2021-03-02 Thread Anton Yakovlev
On 02.03.2021 10:11, Takashi Iwai wrote: On Tue, 02 Mar 2021 09:09:33 +0100, Anton Yakovlev wrote: On 02.03.2021 07:48, Takashi Iwai wrote: On Tue, 02 Mar 2021 07:29:20 +0100, Anton Yakovlev wrote: On 28.02.2021 13:05, Takashi Iwai wrote: On Sat, 27 Feb 2021 09:59:56 +0100, Anton Yakovlev w

Re: [RFC PATCH 01/10] vdpa: add get_config_size callback in vdpa_config_ops

2021-03-02 Thread Stefano Garzarella
On Tue, Mar 02, 2021 at 12:14:13PM +0800, Jason Wang wrote: On 2021/2/16 5:44 下午, Stefano Garzarella wrote: This new callback is used to get the size of the configuration space of vDPA devices. Signed-off-by: Stefano Garzarella --- include/linux/vdpa.h | 4 drivers/vdpa/ifc

Re: [RFC PATCH 10/10] vhost/vdpa: return configuration bytes read and written to user space

2021-03-02 Thread Stefano Garzarella
On Tue, Mar 02, 2021 at 12:05:35PM +0800, Jason Wang wrote: On 2021/2/16 5:44 下午, Stefano Garzarella wrote: vdpa_get_config() and vdpa_set_config() now return the amount of bytes read and written, so let's return them to the user space. We also modify vhost_vdpa_config_validate() to return 0 (

Re: [virtio-dev] Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-03-02 Thread Cornelia Huck
On Mon, 1 Mar 2021 11:51:08 +0800 Jason Wang wrote: > On 2021/3/1 5:25 上午, Michael S. Tsirkin wrote: > > On Fri, Feb 26, 2021 at 04:19:16PM +0800, Jason Wang wrote: > >> On 2021/2/26 2:53 上午, Michael S. Tsirkin wrote: > >>> Confused. What is wrong with the above? It never reads the > >>> fie

Re: [PATCH] vdpa/mlx5: Fix wrong use of bit numbers

2021-03-02 Thread Michael S. Tsirkin
On Tue, Mar 02, 2021 at 07:23:06AM +0200, Eli Cohen wrote: > On Mon, Mar 01, 2021 at 10:33:14AM -0500, Michael S. Tsirkin wrote: > > On Mon, Mar 01, 2021 at 03:52:45PM +0800, Jason Wang wrote: > > > > > > On 2021/3/1 2:28 下午, Eli Cohen wrote: > > > > VIRTIO_F_VERSION_1 is a bit number. Use BIT_ULL

Re: [RFC PATCH 06/27] virtio: Add virtio_queue_get_used_notify_split

2021-03-02 Thread Stefan Hajnoczi
On Tue, Jan 12, 2021 at 07:21:27PM +0100, Eugenio Perez Martin wrote: > On Mon, Dec 7, 2020 at 5:58 PM Stefan Hajnoczi wrote: > > > > On Fri, Nov 20, 2020 at 07:50:44PM +0100, Eugenio Pérez wrote: > > > This function is just used for a few commits, so SW LM is developed > > > incrementally, and it

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-02 Thread Arnd Bergmann
On Tue, Mar 2, 2021 at 10:51 AM Stefan Hajnoczi wrote: > On Tue, Mar 02, 2021 at 10:42:06AM +0800, Jie Deng wrote: > > > > +/* > > > > + * Definitions for virtio I2C Adpter > > > > + * > > > > + * Copyright (c) 2021 Intel Corporation. All rights reserved. > > > > + */ > > > > + > > > > +#ifndef _U

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-03-02 Thread Jason Wang
On 2021/3/2 5:47 下午, Michael S. Tsirkin wrote: On Mon, Mar 01, 2021 at 11:56:50AM +0800, Jason Wang wrote: On 2021/3/1 5:34 上午, Michael S. Tsirkin wrote: On Wed, Feb 24, 2021 at 10:24:41AM -0800, Si-Wei Liu wrote: Detecting it isn't enough though, we will need a new ioctl to notify the kernel

Re: [PATCH] vhost-vdpa: honor CAP_IPC_LOCK

2021-03-02 Thread Jason Wang
On 2021/3/2 5:51 下午, Michael S. Tsirkin wrote: On Tue, Mar 02, 2021 at 04:14:18AM -0500, Jason Wang wrote: When CAP_IPC_LOCK is set we should not check locked memory against rlimit as what has been implemented in mlock(). Signed-off-by: Jason Wang Indeed and it's not just mlock. Documentati

[PATCH V2] vhost-vdpa: honor CAP_IPC_LOCK

2021-03-02 Thread Jason Wang
When CAP_IPC_LOCK is set we should not check locked memory against rlimit as what has been implemented in mlock() and documented in Documentation/admin-guide/perf-security.rst: " RLIMIT_MEMLOCK and perf_event_mlock_kb resource constraints are ignored for processes with the CAP_IPC_LOCK capability.

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-02 Thread Stefan Hajnoczi
On Tue, Mar 02, 2021 at 10:42:06AM +0800, Jie Deng wrote: > > On 2021/3/1 23:19, Arnd Bergmann wrote: > > On Mon, Mar 1, 2021 at 7:41 AM Jie Deng wrote: > > > > > --- /dev/null > > > +++ b/include/uapi/linux/virtio_i2c.h > > > @@ -0,0 +1,56 @@ > > > +/* SPDX-License-Identifier: GPL-2.0-or-later

Re: [PATCH] vhost-vdpa: honor CAP_IPC_LOCK

2021-03-02 Thread Michael S. Tsirkin
On Tue, Mar 02, 2021 at 04:14:18AM -0500, Jason Wang wrote: > When CAP_IPC_LOCK is set we should not check locked memory against > rlimit as what has been implemented in mlock(). > > Signed-off-by: Jason Wang Indeed and it's not just mlock. Documentation/admin-guide/perf-security.rst: RLIMIT_M

Re: [PATCH] vdpa/mlx5: set_features should allow reset to zero

2021-03-02 Thread Michael S. Tsirkin
On Mon, Mar 01, 2021 at 11:56:50AM +0800, Jason Wang wrote: > > On 2021/3/1 5:34 上午, Michael S. Tsirkin wrote: > > On Wed, Feb 24, 2021 at 10:24:41AM -0800, Si-Wei Liu wrote: > > > > Detecting it isn't enough though, we will need a new ioctl to notify > > > > the kernel that it's a legacy guest. U

[PATCH] vhost-vdpa: honor CAP_IPC_LOCK

2021-03-02 Thread Jason Wang
When CAP_IPC_LOCK is set we should not check locked memory against rlimit as what has been implemented in mlock(). Signed-off-by: Jason Wang --- drivers/vhost/vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index ef688c8c0e

Re: [PATCH v5] i2c: virtio: add a virtio i2c frontend driver

2021-03-02 Thread Jie Deng
On 2021/3/2 15:24, Viresh Kumar wrote: On 02-03-21, 14:24, Jie Deng wrote: Not for the full duplex. As Paolo explained in those links. We defined a combined request called "write-read request" " This is when a write is followed by a read: the master starts off the transmission with a write, th

Re: [PATCH v6 9/9] ALSA: virtio: introduce device suspend/resume support

2021-03-02 Thread Anton Yakovlev
On 02.03.2021 07:48, Takashi Iwai wrote: On Tue, 02 Mar 2021 07:29:20 +0100, Anton Yakovlev wrote: On 28.02.2021 13:05, Takashi Iwai wrote: On Sat, 27 Feb 2021 09:59:56 +0100, Anton Yakovlev wrote: [snip] --- a/sound/virtio/virtio_pcm.c +++ b/sound/virtio/virtio_pcm.c @@ -109,6 +109,7 @@