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

2021-01-26 Thread Guennadi Liakhovetski
On Sun, 24 Jan 2021, Anton Yakovlev wrote: Enumerate all available PCM channel maps and create ALSA controls. Signed-off-by: Anton Yakovlev --- sound/virtio/Makefile | 1 + sound/virtio/virtio_card.c | 15 +++ sound/virtio/virtio_card.h | 8 ++ sound/virtio/virtio_chmap.c | 237

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

2021-01-25 Thread Guennadi Liakhovetski
On Sun, 24 Jan 2021, Anton Yakovlev wrote: 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 |

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

2021-01-25 Thread Guennadi Liakhovetski
One more thing I missed yesterday: On Mon, 25 Jan 2021, Guennadi Liakhovetski wrote: On Sun, 24 Jan 2021, Anton Yakovlev wrote: Introduce the operators required for the operation of substreams. Signed-off-by: Anton Yakovlev --- sound/virtio/Makefile | 3 +- sound/virtio

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

2021-01-25 Thread Guennadi Liakhovetski
On Sun, 24 Jan 2021, Anton Yakovlev wrote: Introduce the operators required for the operation of substreams. Signed-off-by: Anton Yakovlev --- sound/virtio/Makefile | 3 +- sound/virtio/virtio_pcm.c | 5 +- sound/virtio/virtio_pcm.h | 2 + sound/virtio/virtio_pcm_ops.c |

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

2021-01-25 Thread Guennadi Liakhovetski
On Sun, 24 Jan 2021, Anton Yakovlev wrote: 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

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

2021-01-25 Thread Guennadi Liakhovetski
On Sun, 24 Jan 2021, Anton Yakovlev wrote: 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.

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

2021-01-25 Thread Guennadi Liakhovetski
I think the use of (devm_)kmalloc() and friends needs some refinement in several patches in the series. On Sun, 24 Jan 2021, Anton Yakovlev wrote: 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

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

2021-01-25 Thread Guennadi Liakhovetski
Hi Anton, A couple of mostly cosmetic comments inline. On Sun, 24 Jan 2021, Anton Yakovlev wrote: 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,

Re: [PATCH v7 3/3] vhost: add an RPMsg API

2020-09-21 Thread Guennadi Liakhovetski
Hi Mathieu, On Fri, Sep 18, 2020 at 09:52:49AM -0600, Mathieu Poirier wrote: > Good morning, > > On Fri, Sep 18, 2020 at 11:02:29AM +0200, Guennadi Liakhovetski wrote: > > Hi Mathieu, > > > > On Thu, Sep 17, 2020 at 04:01:38PM -0600, Mathieu Poirier wrote: > >

Re: [PATCH v6 0/4] Add a vhost RPMsg API

2020-09-18 Thread Guennadi Liakhovetski
On Fri, Sep 18, 2020 at 12:39:07PM +0200, Vincent Whitchurch wrote: > On Fri, Sep 18, 2020 at 11:47:20AM +0200, Guennadi Liakhovetski wrote: > > On Fri, Sep 18, 2020 at 09:47:45AM +0200, Arnaud POULIQUEN wrote: > > > IMO, as this API is defined in the Linux documenta

Re: [PATCH v6 0/4] Add a vhost RPMsg API

2020-09-18 Thread Guennadi Liakhovetski
Hi Arnaud, On Fri, Sep 18, 2020 at 09:47:45AM +0200, Arnaud POULIQUEN wrote: > Hi Guennadi, > > On 9/18/20 7:44 AM, Guennadi Liakhovetski wrote: > > Hi Arnaud, > > > > On Thu, Sep 17, 2020 at 05:21:02PM +0200, Arnaud POULIQUEN wrote: > >> Hi Guenna

Re: [PATCH v7 3/3] vhost: add an RPMsg API

2020-09-18 Thread Guennadi Liakhovetski
Hi Mathieu, On Thu, Sep 17, 2020 at 04:01:38PM -0600, Mathieu Poirier wrote: > On Thu, Sep 10, 2020 at 01:13:51PM +0200, Guennadi Liakhovetski wrote: > > Linux supports running the RPMsg protocol over the VirtIO transport > > protocol, but currently there is only support for

Re: [PATCH v7 3/3] vhost: add an RPMsg API

2020-09-18 Thread Guennadi Liakhovetski
Hi Vincent, On Thu, Sep 17, 2020 at 10:55:59AM +0200, Vincent Whitchurch wrote: > On Thu, Sep 10, 2020 at 01:13:51PM +0200, Guennadi Liakhovetski wrote: > > +int vhost_rpmsg_start_lock(struct vhost_rpmsg *vr, struct vhost_rpmsg_iter > > *iter, > > + unsi

Re: [PATCH v6 0/4] Add a vhost RPMsg API

2020-09-17 Thread Guennadi Liakhovetski
Hi Arnaud, On Thu, Sep 17, 2020 at 05:21:02PM +0200, Arnaud POULIQUEN wrote: > Hi Guennadi, > > > -Original Message- > > From: Guennadi Liakhovetski > > Sent: jeudi 17 septembre 2020 07:47 > > To: Arnaud POULIQUEN > > Cc: k...@vger.kernel.o

Re: [PATCH v6 0/4] Add a vhost RPMsg API

2020-09-17 Thread Guennadi Liakhovetski
Hi Vincent, On Thu, Sep 17, 2020 at 10:36:44AM +0200, Vincent Whitchurch wrote: > On Thu, Sep 17, 2020 at 07:47:06AM +0200, Guennadi Liakhovetski wrote: > > On Tue, Sep 15, 2020 at 02:13:23PM +0200, Arnaud POULIQUEN wrote: > > > So i would be agree with Vincent[2] which

Re: [PATCH v6 0/4] Add a vhost RPMsg API

2020-09-16 Thread Guennadi Liakhovetski
Hi Arnaud, On Tue, Sep 15, 2020 at 02:13:23PM +0200, Arnaud POULIQUEN wrote: > Hi Guennadi, > > On 9/1/20 5:11 PM, Guennadi Liakhovetski wrote: > > Hi, > > > > Next update: > > > > v6: > > - rename include/linux/virtio_rpmsg.h -> include/linux/r

Re: [PATCH v5 4/4] vhost: add an RPMsg API

2020-09-15 Thread Guennadi Liakhovetski
On Fri, Sep 11, 2020 at 11:33:13AM -0600, Mathieu Poirier wrote: > On Fri, Sep 11, 2020 at 09:46:56AM +0200, Guennadi Liakhovetski wrote: > > Hi Mathieu, > > > > On Thu, Sep 10, 2020 at 11:22:11AM -0600, Mathieu Poirier wrote: > > > Good morning Guennadi, > >

Re: [PATCH v5 1/4] vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl

2020-09-11 Thread Guennadi Liakhovetski
On Thu, Sep 10, 2020 at 10:46:43AM -0600, Mathieu Poirier wrote: > On Thu, Sep 10, 2020 at 09:15:13AM +0200, Guennadi Liakhovetski wrote: > > Hi Mathieu, > > > > On Wed, Sep 09, 2020 at 04:42:14PM -0600, Mathieu Poirier wrote: > > > On Wed, Aug 26, 2020 at 07:46:33P

Re: [PATCH v5 4/4] vhost: add an RPMsg API

2020-09-11 Thread Guennadi Liakhovetski
Hi Mathieu, On Thu, Sep 10, 2020 at 11:22:11AM -0600, Mathieu Poirier wrote: > Good morning Guennadi, > > On Thu, Sep 10, 2020 at 10:38:54AM +0200, Guennadi Liakhovetski wrote: > > Hi Mathieu, > > > > On Wed, Sep 09, 2020 at 04:39:46PM -0600, Mathieu Poirier

Re: [PATCH v5 3/4] rpmsg: update documentation

2020-09-10 Thread Guennadi Liakhovetski
On Thu, Sep 10, 2020 at 09:18:41AM +0200, Guennadi Liakhovetski wrote: > On Wed, Sep 09, 2020 at 04:45:21PM -0600, Mathieu Poirier wrote: > > On Wed, Aug 26, 2020 at 07:46:35PM +0200, Guennadi Liakhovetski wrote: > > > rpmsg_create_ept() takes struct rpmsg_channel_info

[PATCH v7 3/3] vhost: add an RPMsg API

2020-09-10 Thread Guennadi Liakhovetski
and the host. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/Kconfig | 7 + drivers/vhost/Makefile | 3 + drivers/vhost/rpmsg.c | 370 drivers/vhost/vhost_rpmsg.h | 74 4 files changed, 454 insertions(+) create mode 100644

[PATCH v7 0/3] Add a vhost RPMsg API

2020-09-10 Thread Guennadi Liakhovetski
drivers for such RPMsg-based solutions. The first use case is an audio DSP virtualisation project, currently under development, ready for review and submission, available at https://github.com/thesofproject/linux/pull/1501/commits Thanks Guennadi Guennadi Liakhovetski (3): vhost: convert

[PATCH v7 2/3] rpmsg: move common structures and defines to headers

2020-09-10 Thread Guennadi Liakhovetski
virtio_rpmsg_bus.c keeps RPMsg protocol structure declarations and common defines like the ones, needed for name-space announcements, internal. Move them to common headers instead. Signed-off-by: Guennadi Liakhovetski Reviewed-by: Mathieu Poirier --- drivers/rpmsg/virtio_rpmsg_bus.c | 78

[PATCH v7 1/3] vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl

2020-09-10 Thread Guennadi Liakhovetski
it of a status change, e.g. upon a guest reboot. This patch makes that ioctl generic, while preserving its numeric value and also keeping the original alias. Signed-off-by: Guennadi Liakhovetski --- include/uapi/linux/vhost.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v5 4/4] vhost: add an RPMsg API

2020-09-10 Thread Guennadi Liakhovetski
Hi Mathieu, On Wed, Sep 09, 2020 at 04:39:46PM -0600, Mathieu Poirier wrote: > Good afternoon, > > On Wed, Aug 26, 2020 at 07:46:36PM +0200, Guennadi Liakhovetski wrote: > > Linux supports running the RPMsg protocol over the VirtIO transport > > protocol, but currently

Re: [PATCH v5 3/4] rpmsg: update documentation

2020-09-10 Thread Guennadi Liakhovetski
On Wed, Sep 09, 2020 at 04:45:21PM -0600, Mathieu Poirier wrote: > On Wed, Aug 26, 2020 at 07:46:35PM +0200, Guennadi Liakhovetski wrote: > > rpmsg_create_ept() takes struct rpmsg_channel_info chinfo as its last > > argument, not a u32 value. The first two arguments a

Re: [PATCH v5 1/4] vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl

2020-09-10 Thread Guennadi Liakhovetski
Hi Mathieu, On Wed, Sep 09, 2020 at 04:42:14PM -0600, Mathieu Poirier wrote: > On Wed, Aug 26, 2020 at 07:46:33PM +0200, Guennadi Liakhovetski wrote: > > VHOST_VSOCK_SET_RUNNING is used by the vhost vsock driver to perform > > crucial VirtQueue initialisation, like assigning

Re: [PATCH v6 2/4] rpmsg: move common structures and defines to headers

2020-09-02 Thread Guennadi Liakhovetski
Hi Mathieu, On Wed, Sep 02, 2020 at 11:24:37AM -0600, Mathieu Poirier wrote: > On Wed, Sep 02, 2020 at 07:35:27AM +0200, Guennadi Liakhovetski wrote: > > Hi Mathew, > > > > On Tue, Sep 01, 2020 at 11:23:21AM -0600, Mathieu Poirier wrote: > > > On Tue, Sep 01, 2020

Re: [PATCH v6 2/4] rpmsg: move common structures and defines to headers

2020-09-01 Thread Guennadi Liakhovetski
Hi Mathew, On Tue, Sep 01, 2020 at 11:23:21AM -0600, Mathieu Poirier wrote: > On Tue, Sep 01, 2020 at 05:11:51PM +0200, Guennadi Liakhovetski wrote: > > virtio_rpmsg_bus.c keeps RPMsg protocol structure declarations and > > common defines like the ones, needed for name-spac

[PATCH v6 3/4] rpmsg: update documentation

2020-09-01 Thread Guennadi Liakhovetski
rpmsg_create_ept() takes struct rpmsg_channel_info chinfo as its last argument, not a u32 value. The first two arguments are also updated. Signed-off-by: Guennadi Liakhovetski --- Documentation/rpmsg.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation

[PATCH v6 2/4] rpmsg: move common structures and defines to headers

2020-09-01 Thread Guennadi Liakhovetski
virtio_rpmsg_bus.c keeps RPMsg protocol structure declarations and common defines like the ones, needed for name-space announcements, internal. Move them to common headers instead. Signed-off-by: Guennadi Liakhovetski --- drivers/rpmsg/virtio_rpmsg_bus.c | 78

[PATCH v6 4/4] vhost: add an RPMsg API

2020-09-01 Thread Guennadi Liakhovetski
Linux supports running the RPMsg protocol over the VirtIO transport protocol, but currently there is only support for VirtIO clients and no support for a VirtIO server. This patch adds a vhost-based RPMsg server implementation. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/Kconfig

[PATCH v6 1/4] vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl

2020-09-01 Thread Guennadi Liakhovetski
it of a status change, e.g. upon a guest reboot. This patch makes that ioctl generic, while preserving its numeric value and also keeping the original alias. Signed-off-by: Guennadi Liakhovetski --- include/uapi/linux/vhost.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v6 0/4] Add a vhost RPMsg API

2020-09-01 Thread Guennadi Liakhovetski
ently under development, ready for review and submission, available at https://github.com/thesofproject/linux/pull/1501/commits Thanks Guennadi Guennadi Liakhovetski (4): vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl rpmsg: move common structures and defines to headers rpmsg: updat

[PATCH v5 4/4] vhost: add an RPMsg API

2020-08-26 Thread Guennadi Liakhovetski
Linux supports running the RPMsg protocol over the VirtIO transport protocol, but currently there is only support for VirtIO clients and no support for a VirtIO server. This patch adds a vhost-based RPMsg server implementation. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/Kconfig

[PATCH v5 2/4] rpmsg: move common structures and defines to headers

2020-08-26 Thread Guennadi Liakhovetski
virtio_rpmsg_bus.c keeps RPMsg protocol structure declarations and common defines like the ones, needed for name-space announcements, internal. Move them to common headers instead. Signed-off-by: Guennadi Liakhovetski --- drivers/rpmsg/virtio_rpmsg_bus.c | 78

[PATCH v5 1/4] vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl

2020-08-26 Thread Guennadi Liakhovetski
it of a status change, e.g. upon a guest reboot. This patch makes that ioctl generic, while preserving its numeric value and also keeping the original alias. Signed-off-by: Guennadi Liakhovetski --- include/uapi/linux/vhost.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v5 3/4] rpmsg: update documentation

2020-08-26 Thread Guennadi Liakhovetski
rpmsg_create_ept() takes struct rpmsg_channel_info chinfo as its last argument, not a u32 value. The first two arguments are also updated. Signed-off-by: Guennadi Liakhovetski --- Documentation/rpmsg.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation

[PATCH v5 0/4] Add a vhost RPMsg API

2020-08-26 Thread Guennadi Liakhovetski
t https://github.com/thesofproject/linux/pull/1501/commits Thanks Guennadi Guennadi Liakhovetski (4): vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl rpmsg: move common structures and defines to headers rpmsg: update documentation vhost: add an RPMsg API Documentation/rpmsg.txt |

Re: [PATCH v4 4/4] vhost: add an RPMsg API

2020-08-25 Thread Guennadi Liakhovetski
Hi Michael, ...back from holidays and still unsure what your preferred solution for the message layout would be: On Wed, Aug 12, 2020 at 02:32:43PM +0200, Guennadi Liakhovetski wrote: > Hi Michael, > > Thanks for a review. > > On Mon, Aug 10, 2020 at 09:44:15AM -0400, Michael S

Re: [PATCH v4 4/4] vhost: add an RPMsg API

2020-08-12 Thread Guennadi Liakhovetski
Hi Michael, Thanks for a review. On Mon, Aug 10, 2020 at 09:44:15AM -0400, Michael S. Tsirkin wrote: > On Tue, Aug 04, 2020 at 05:19:17PM +0200, Guennadi Liakhovetski wrote: > > On Tue, Aug 04, 2020 at 10:27:08AM -0400, Michael S. Tsirkin wrote: > > > On Wed, Jul 22, 2020 a

Re: [PATCH v4 4/4] vhost: add an RPMsg API

2020-08-04 Thread Guennadi Liakhovetski
On Tue, Aug 04, 2020 at 10:27:08AM -0400, Michael S. Tsirkin wrote: > On Wed, Jul 22, 2020 at 05:09:27PM +0200, Guennadi Liakhovetski wrote: > > Linux supports running the RPMsg protocol over the VirtIO transport > > protocol, but currently there is only support for

Re: [PATCH v4 0/4] Add a vhost RPMsg API

2020-08-04 Thread Guennadi Liakhovetski
On Tue, Aug 04, 2020 at 10:10:23AM -0400, Michael S. Tsirkin wrote: > On Tue, Aug 04, 2020 at 03:19:19PM +0200, Guennadi Liakhovetski wrote: > > Hi Michael, > > > > On Tue, Aug 04, 2020 at 08:26:53AM -0400, Michael S. Tsirkin wrote: > > > On Wed, Jul 22, 2020

Re: [PATCH v4 0/4] Add a vhost RPMsg API

2020-08-04 Thread Guennadi Liakhovetski
Hi Michael, On Tue, Aug 04, 2020 at 08:26:53AM -0400, Michael S. Tsirkin wrote: > On Wed, Jul 22, 2020 at 05:09:23PM +0200, Guennadi Liakhovetski wrote: > > Hi, > > > > Now that virtio-rpmsg endianness fixes have been merged we can > > proceed with the next step. >

Re: [PATCH v4 0/4] Add a vhost RPMsg API

2020-07-30 Thread Guennadi Liakhovetski
Hi Michael, On Thu, Jul 30, 2020 at 12:08:29PM -0400, Michael S. Tsirkin wrote: > On Wed, Jul 22, 2020 at 05:09:23PM +0200, Guennadi Liakhovetski wrote: > > Hi, > > > > Now that virtio-rpmsg endianness fixes have been merged we can > > proceed with the

[PATCH v4 4/4] vhost: add an RPMsg API

2020-07-22 Thread Guennadi Liakhovetski
Linux supports running the RPMsg protocol over the VirtIO transport protocol, but currently there is only support for VirtIO clients and no support for a VirtIO server. This patch adds a vhost-based RPMsg server implementation. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/Kconfig

[PATCH v4 1/4] vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl

2020-07-22 Thread Guennadi Liakhovetski
it of a status change, e.g. upon a guest reboot. This patch makes that ioctl generic, while preserving its numeric value and also keeping the original alias. Signed-off-by: Guennadi Liakhovetski --- include/uapi/linux/vhost.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v4 2/4] rpmsg: move common structures and defines to headers

2020-07-22 Thread Guennadi Liakhovetski
virtio_rpmsg_bus.c keeps RPMsg protocol structure declarations and common defines like the ones, needed for name-space announcements, internal. Move them to common headers instead. Signed-off-by: Guennadi Liakhovetski --- drivers/rpmsg/virtio_rpmsg_bus.c | 78

[PATCH v4 0/4] Add a vhost RPMsg API

2020-07-22 Thread Guennadi Liakhovetski
eview and submission, available at https://github.com/thesofproject/linux/pull/1501/commits Thanks Guennadi Guennadi Liakhovetski (4): vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl rpmsg: move common structures and defines to headers rpmsg: update documentation vhost: add an RPMsg

[PATCH v4 3/4] rpmsg: update documentation

2020-07-22 Thread Guennadi Liakhovetski
rpmsg_create_ept() takes struct rpmsg_channel_info chinfo as its last argument, not a u32 value. The first two arguments are also updated. Signed-off-by: Guennadi Liakhovetski Reviewed-by: Mathieu Poirier --- Documentation/rpmsg.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions

Re: [PATCH v4 1/3] virtio: add dma-buf support for exported objects

2020-06-19 Thread Guennadi Liakhovetski
Hi David, On Fri, Jun 19, 2020 at 10:57:37AM +0900, David Stevens wrote: > On Thu, Jun 18, 2020 at 9:29 PM Guennadi Liakhovetski > wrote: > > > > Hi Michael, > > > > On Thu, Jun 04, 2020 at 03:05:23PM -0400, Michael S. Tsirkin wrote: > > > On Tue, May 26,

Re: [PATCH v3 5/5] vhost: add an RPMsg API

2020-06-18 Thread Guennadi Liakhovetski
On Thu, Jun 18, 2020 at 03:52:42PM +0200, Vincent Whitchurch wrote: > On Thu, Jun 18, 2020 at 12:39:40PM +0200, Guennadi Liakhovetski wrote: > > On Thu, Jun 18, 2020 at 11:33:24AM +0200, Vincent Whitchurch wrote: > > > By the "normal rpmsg API" I mean registe

Re: [PATCH v4 1/3] virtio: add dma-buf support for exported objects

2020-06-18 Thread Guennadi Liakhovetski
Hi Michael, On Thu, Jun 04, 2020 at 03:05:23PM -0400, Michael S. Tsirkin wrote: > On Tue, May 26, 2020 at 07:58:09PM +0900, David Stevens wrote: > > This change adds a new flavor of dma-bufs that can be used by virtio > > drivers to share exported objects. A virtio dma-buf can be queried by > >

Re: [PATCH v3 5/5] vhost: add an RPMsg API

2020-06-18 Thread Guennadi Liakhovetski
On Thu, Jun 18, 2020 at 11:33:24AM +0200, Vincent Whitchurch wrote: > On Thu, Jun 18, 2020 at 11:03:42AM +0200, Guennadi Liakhovetski wrote: > > On Wed, Jun 17, 2020 at 09:17:42PM +0200, Vincent Whitchurch wrote: > > > On Wed, May 27, 2020 at 08:05:41PM +0200, Guennadi

Re: [PATCH v3 5/5] vhost: add an RPMsg API

2020-06-18 Thread Guennadi Liakhovetski
Hi Vincent, On Wed, Jun 17, 2020 at 09:17:42PM +0200, Vincent Whitchurch wrote: > On Wed, May 27, 2020 at 08:05:41PM +0200, Guennadi Liakhovetski wrote: > > Linux supports running the RPMsg protocol over the VirtIO transport > > protocol, but currently there is only support for

Re: [RFC 12/12] rpmsg: add a device ID to also bind to the ADSP device

2020-06-08 Thread Guennadi Liakhovetski
Hi Mathieu, On Mon, Jun 08, 2020 at 10:17:57AM -0600, Mathieu Poirier wrote: > On Fri, Jun 05, 2020 at 08:46:59AM +0200, Guennadi Liakhovetski wrote: > > Hi Mathieu, > > > > On Thu, Jun 04, 2020 at 02:01:56PM -0600, Mathieu Poirier wrote: > > > On Fri, May 29, 2020

Re: [PATCH v3 0/5] Add a vhost RPMsg API

2020-06-08 Thread Guennadi Liakhovetski
On Mon, Jun 08, 2020 at 12:15:26PM +0200, Guennadi Liakhovetski wrote: > On Mon, Jun 08, 2020 at 05:19:06AM -0400, Michael S. Tsirkin wrote: > > On Mon, Jun 08, 2020 at 11:11:00AM +0200, Guennadi Liakhovetski wrote: > > > Update: I looked through VirtIO 1.0 and 1.1

Re: [PATCH v3 0/5] Add a vhost RPMsg API

2020-06-08 Thread Guennadi Liakhovetski
On Mon, Jun 08, 2020 at 05:19:06AM -0400, Michael S. Tsirkin wrote: > On Mon, Jun 08, 2020 at 11:11:00AM +0200, Guennadi Liakhovetski wrote: > > Update: I looked through VirtIO 1.0 and 1.1 specs, data format their, > > including byte order, is defined on a per-device ty

Re: [PATCH v3 0/5] Add a vhost RPMsg API

2020-06-08 Thread Guennadi Liakhovetski
it looks like newer interface definitions specify using "guest native endianness" for Virtual Queue data. So I think the same should be done for RPMsg instead of enforcing LE? Thanks Guennadi On Mon, Jun 08, 2020 at 09:37:15AM +0200, Guennadi Liakhovetski wrote: > Hi Michael, >

Re: [PATCH v3 0/5] Add a vhost RPMsg API

2020-06-08 Thread Guennadi Liakhovetski
Hi Michael, On Fri, Jun 05, 2020 at 08:34:35AM +0200, Guennadi Liakhovetski wrote: > > On Thu, Jun 04, 2020 at 03:23:37PM -0400, Michael S. Tsirkin wrote: [snip] > > Another it's out of line with 1.0 spec passing guest > > endian data around. Won't work if host and guest

Re: [RFC 12/12] rpmsg: add a device ID to also bind to the ADSP device

2020-06-05 Thread Guennadi Liakhovetski
Hi Mathieu, On Thu, Jun 04, 2020 at 02:01:56PM -0600, Mathieu Poirier wrote: > On Fri, May 29, 2020 at 09:37:22AM +0200, Guennadi Liakhovetski wrote: > > The ADSP device uses the RPMsg API to connect vhost and VirtIO SOF > > Audio DSP drivers on KVM host and guest. >

Re: [RFC 11/12] rpmsg: increase buffer size and reduce buffer number

2020-06-05 Thread Guennadi Liakhovetski
Hi Mathieu, On Thu, Jun 04, 2020 at 01:58:39PM -0600, Mathieu Poirier wrote: > Hi Guennadi, > > On Fri, May 29, 2020 at 09:37:21AM +0200, Guennadi Liakhovetski wrote: > > It is hard to imagine use-cases where 512 buffers would really be > > needed, whereas 512 bytes pe

Re: [PATCH v3 0/5] Add a vhost RPMsg API

2020-06-05 Thread Guennadi Liakhovetski
Hi Michael, Thanks for your review. On Thu, Jun 04, 2020 at 03:23:37PM -0400, Michael S. Tsirkin wrote: > On Wed, May 27, 2020 at 08:05:36PM +0200, Guennadi Liakhovetski wrote: > > v3: > > - address several checkpatch warnings > > - address comments from Mathieu Poirier >

[RFC 11/12] rpmsg: increase buffer size and reduce buffer number

2020-05-29 Thread Guennadi Liakhovetski
It is hard to imagine use-cases where 512 buffers would really be needed, whereas 512 bytes per buffer might be too little. Change this to use 16 16KiB buffers instead. Signed-off-by: Guennadi Liakhovetski --- include/linux/virtio_rpmsg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[RFC 12/12] rpmsg: add a device ID to also bind to the ADSP device

2020-05-29 Thread Guennadi Liakhovetski
The ADSP device uses the RPMsg API to connect vhost and VirtIO SOF Audio DSP drivers on KVM host and guest. Signed-off-by: Guennadi Liakhovetski --- drivers/rpmsg/virtio_rpmsg_bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg

[RFC 04/12] ASoC: SOF: add a power status IPC

2020-05-29 Thread Guennadi Liakhovetski
. This is needed to decide whether to re-send the topology again. To support this we add a new PM IPC message SOF_IPC_PM_VFE_POWER_STATUS and a reset counter to track the state of the DSP. Signed-off-by: Guennadi Liakhovetski --- include/sound/sof/header.h | 1 + sound/soc/sof/core.c | 2 ++ sound/soc

[RFC 06/12] ASoC: SOF: add an RPMsg VirtIO DSP driver

2020-05-29 Thread Guennadi Liakhovetski
out of 3 endpoints and only preserving the control channel. Signed-off-by: Guennadi Liakhovetski --- include/sound/sof.h | 4 + include/sound/sof/header.h | 2 + include/sound/sof/rpmsg.h | 120 ++ include/sound/sof/topology.h| 9 +- include/uapi/linux

[RFC 01/12] ASoC: add function parameters to enable forced path pruning

2020-05-29 Thread Guennadi Liakhovetski
viour isn't affected. Signed-off-by: Guennadi Liakhovetski --- include/sound/soc-dpcm.h | 28 sound/soc/soc-compress.c | 2 +- sound/soc/soc-dapm.c | 8 +++--- sound/soc/soc-pcm.c | 67 +--- 4 files changed, 74 inserti

[RFC 08/12] ASoC: SOF: add a vhost driver: sound part

2020-05-29 Thread Guennadi Liakhovetski
The SOF VirtIO driver uses a vhost RPMsg driver as a counterpart to communicate with the DSP. This patch adds a sound interface of the vhost driver. Signed-off-by: Guennadi Liakhovetski --- include/sound/soc-topology.h |3 + include/sound/sof/rpmsg.h| 72 +++ include/uapi

[RFC 03/12] ASoC: SOF: support IPC with immediate response

2020-05-29 Thread Guennadi Liakhovetski
Usually when an IPC message is sent, we have to wait for a reply from the DSP or from the host in the VirtIO case. However, sometimes in the VirtIO case a response is available immediately. Skip sleeping in such cases. Signed-off-by: Guennadi Liakhovetski --- sound/soc/sof/ipc.c | 11

[RFC 09/12] ASoC: SOF: VirtIO: free guest pipelines upon termination

2020-05-29 Thread Guennadi Liakhovetski
shut down. Signed-off-by: Guennadi Liakhovetski --- include/sound/sof/rpmsg.h | 4 ++ sound/soc/sof/vhost-vbe.c | 158 +- 2 files changed, 161 insertions(+), 1 deletion(-) diff --git a/include/sound/sof/rpmsg.h b/include/sound/sof/rpmsg.h index ce522c6

[RFC 10/12] vhost: add an SOF Audio DSP driver

2020-05-29 Thread Guennadi Liakhovetski
The SOF ADSP vhost driver consists of two parts: a sound and a vhost part. This patch implements the vhost part of the driver. It handles QEMU communication with the vhost misc device and virtual queues to any VirtIO RPMsg guests. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/Kconfig

[RFC 05/12] ASoC: SOF: add two helper lookup functions

2020-05-29 Thread Guennadi Liakhovetski
Add two helper lookup functions for finding a widget by its component ID and a DAI by a pipeline ID. Signed-off-by: Guennadi Liakhovetski --- sound/soc/sof/sof-audio.c | 24 sound/soc/sof/sof-audio.h | 5 + sound/soc/sof/topology.c | 1 + 3 files changed, 30

[RFC 07/12] ASoC: SOF: use a macro instead of a hard-coded value

2020-05-29 Thread Guennadi Liakhovetski
target_stats in sof_suspend should contain one of SOF_DSP_PM_* power state macros, not a hard-coded value 0. Signed-off-by: Guennadi Liakhovetski --- sound/soc/sof/pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c index 5e804a7

[RFC 02/12] ASoC: SOF: extract firmware-related operation into a function

2020-05-29 Thread Guennadi Liakhovetski
In the VirtIO guest case the SOF will not be dealing with the firmware directly. Extract related functionality into a function to make the separation easier. Signed-off-by: Guennadi Liakhovetski --- sound/soc/sof/core.c | 85 ++-- 1 file changed

[RFC 00/12] Audio DSP VirtIO and vhost drivers

2020-05-29 Thread Guennadi Liakhovetski
ciated too! Thanks Guennadi [1] https://mailman.alsa-project.org/pipermail/sound-open-firmware/2020-May/003879.html Guennadi Liakhovetski (12): ASoC: add function parameters to enable forced path pruning ASoC: SOF: extract firmware-related operation into a function ASoC: SOF: s

Re: [PATCH v3 0/5] Add a vhost RPMsg API

2020-05-29 Thread Guennadi Liakhovetski
Hi Jason, On Fri, May 29, 2020 at 02:01:53PM +0800, Jason Wang wrote: > > On 2020/5/28 上午2:05, Guennadi Liakhovetski wrote: > > v3: > > - address several checkpatch warnings > > - address comments from Mathieu Poirier > > > > v2: > > - update patch #5

[PATCH v3 4/5] rpmsg: update documentation

2020-05-27 Thread Guennadi Liakhovetski
rpmsg_create_ept() takes struct rpmsg_channel_info chinfo as its last argument, not a u32 value. The first two arguments are also updated. Signed-off-by: Guennadi Liakhovetski --- Documentation/rpmsg.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation

[PATCH v3 1/5] vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl

2020-05-27 Thread Guennadi Liakhovetski
it of a status change, e.g. upon a guest reboot. This patch makes that ioctl generic, while preserving its numeric value and also keeping the original alias. Signed-off-by: Guennadi Liakhovetski --- include/uapi/linux/vhost.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v3 0/5] Add a vhost RPMsg API

2020-05-27 Thread Guennadi Liakhovetski
or review only since it cannot be merged without audio patches being upstreamed first. Thanks Guennadi Guennadi Liakhovetski (5): vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl vhost: (cosmetic) remove a superfluous variable initialisation rpmsg: move common structures and defines to hea

[PATCH v3 5/5] vhost: add an RPMsg API

2020-05-27 Thread Guennadi Liakhovetski
Linux supports running the RPMsg protocol over the VirtIO transport protocol, but currently there is only support for VirtIO clients and no support for a VirtIO server. This patch adds a vhost-based RPMsg server implementation. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/Kconfig

[PATCH v3 3/5] rpmsg: move common structures and defines to headers

2020-05-27 Thread Guennadi Liakhovetski
virtio_rpmsg_bus.c keeps RPMsg protocol structure declarations and common defines like the ones, needed for name-space announcements, internal. Move them to common headers instead. Reviewed-by: Mathieu Poirier Signed-off-by: Guennadi Liakhovetski --- drivers/rpmsg/virtio_rpmsg_bus.c | 78

[PATCH v3 2/5] vhost: (cosmetic) remove a superfluous variable initialisation

2020-05-27 Thread Guennadi Liakhovetski
Even the compiler is able to figure out that in this case the initialisation is superfluous. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2f4383bb..2b9ad8a

Re: [PATCH v2 5/5] vhost: add an RPMsg API

2020-05-27 Thread Guennadi Liakhovetski
Hi Mathieu, On Tue, May 26, 2020 at 02:50:39PM -0600, Mathieu Poirier wrote: > Hi Guennadi, > > On Mon, May 25, 2020 at 04:44:58PM +0200, Guennadi Liakhovetski wrote: > > Linux supports running the RPMsg protocol over the VirtIO transport > > protocol, but currently

Re: [Sound-open-firmware] [PATCH 5/6] vhost: add an rpmsg API

2020-05-26 Thread Guennadi Liakhovetski
Hi Pierre, On Tue, May 26, 2020 at 01:30:24PM -0500, Pierre-Louis Bossart wrote: > > > On 5/25/20 8:53 AM, Guennadi Liakhovetski wrote: > > Hi Pierre, > > > > On Sat, May 16, 2020 at 12:00:35PM -0500, Pierre-Louis Bossart wrote: > > > > > > &

[PATCH v2 3/5] rpmsg: move common structures and defines to headers

2020-05-25 Thread Guennadi Liakhovetski
virtio_rpmsg_bus.c keeps RPMsg protocol structure declarations and common defines like the ones, needed for name-space announcements, internal. Move them to common headers instead. Signed-off-by: Guennadi Liakhovetski --- drivers/rpmsg/virtio_rpmsg_bus.c | 78

[PATCH v2 4/5] rpmsg: update documentation

2020-05-25 Thread Guennadi Liakhovetski
rpmsg_create_ept() takes struct rpmsg_channel_info chinfo as its last argument, not a u32 value. Signed-off-by: Guennadi Liakhovetski --- Documentation/rpmsg.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/rpmsg.txt b/Documentation/rpmsg.txt index 24b7a9e

[PATCH v2 5/5] vhost: add an RPMsg API

2020-05-25 Thread Guennadi Liakhovetski
Linux supports running the RPMsg protocol over the VirtIO transport protocol, but currently there is only support for VirtIO clients and no support for a VirtIO server. This patch adds a vhost-based RPMsg server implementation. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/Kconfig

[PATCH v2 0/5] Add a vhost RPMsg API

2020-05-25 Thread Guennadi Liakhovetski
eview and submission, available at https://github.com/thesofproject/linux/pull/1501/commits A further patch for the ADSP vhost RPMsg driver will be sent separately for review only since it cannot be merged without audio patches being upstreamed first. Thanks Guennadi Guennadi Liakhovetski (

[PATCH v2 1/5] vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl

2020-05-25 Thread Guennadi Liakhovetski
it of a status change, e.g. upon a guest reboot. This patch makes that ioctl generic, while preserving its numeric value and also keeping the original alias. Signed-off-by: Guennadi Liakhovetski --- include/uapi/linux/vhost.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[PATCH v2 2/5] vhost: (cosmetic) remove a superfluous variable initialisation

2020-05-25 Thread Guennadi Liakhovetski
Even the compiler is able to figure out that in this case the initialisation is superfluous. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 2f4383bb..2b9ad8a

Re: [Sound-open-firmware] [PATCH 5/6] vhost: add an rpmsg API

2020-05-25 Thread Guennadi Liakhovetski
Hi Pierre, On Sat, May 16, 2020 at 12:00:35PM -0500, Pierre-Louis Bossart wrote: > > > +config VHOST_RPMSG > > + tristate > > + depends on VHOST > > depends on RPMSG_VIRTIO? No, RPMSG_VIRTIO is used on the guest side, VHOST_RPMSG (as well as all other vhost drivers) on the host side. > >

Re: [Sound-open-firmware] [PATCH RFC] vhost: add an SOF Audio DSP driver

2020-05-25 Thread Guennadi Liakhovetski
Hi Pierre, Thanks for the review! On Sat, May 16, 2020 at 11:50:48AM -0500, Pierre-Louis Bossart wrote: > > > > > +config VHOST_SOF > > + tristate "Vhost SOF driver" > > + depends on SND_SOC_SOF > > you probably want to make sure VHOST_SOF and SND_SOC_SOF are both built-in > or module.

[PATCH RFC] vhost: add an SOF Audio DSP driver

2020-05-16 Thread Guennadi Liakhovetski
The SOF ADSP vhost driver consists of two parts: a sound and a vhost part. This patch implements the vhost part of the driver. It handles QEMU communication with the vhost misc device and virtual queues to any VirtIO RPMsg guests. Signed-off-by: Guennadi Liakhovetski --- This is marked

[PATCH 6/6] rpmsg: add a device ID to also bind to the ADSP device

2020-05-16 Thread Guennadi Liakhovetski
The ADSP device uses the RPMsg API to connect vhost and VirtIO SOF Audio DSP drivers on KVM host and guest. Signed-off-by: Guennadi Liakhovetski --- drivers/rpmsg/virtio_rpmsg_bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg

[PATCH 5/6] vhost: add an rpmsg API

2020-05-16 Thread Guennadi Liakhovetski
Linux supports running the RPMsg protocol over the VirtIO transport protocol, but currently there is only support for VirtIO clients and no support for a VirtIO server. This patch adds a vhost-based RPMsg server implementation. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/Kconfig

[PATCH 4/6] rpmsg: update documentation

2020-05-16 Thread Guennadi Liakhovetski
rpmsg_create_ept() takes struct rpmsg_channel_info chinfo as its last argument, not a u32 value. Signed-off-by: Guennadi Liakhovetski --- Documentation/rpmsg.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/rpmsg.txt b/Documentation/rpmsg.txt index 24b7a9e

[PATCH 0/6] Add a vhost RPMsg API

2020-05-16 Thread Guennadi Liakhovetski
it cannot be merged without audio patches being upstreamed first. Thanks Guennadi Guennadi Liakhovetski (6): vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl vhost: (cosmetic) remove a superfluous variable initialisation rpmsg: move common structures and defines to headers rpm

[PATCH 2/6] vhost: (cosmetic) remove a superfluous variable initialisation

2020-05-16 Thread Guennadi Liakhovetski
Even the compiler is able to figure out that in this case the initialisation is superfluous. Signed-off-by: Guennadi Liakhovetski --- drivers/vhost/vhost.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 47060d8..e22d4a9

[PATCH 1/6] vhost: convert VHOST_VSOCK_SET_RUNNING to a generic ioctl

2020-05-16 Thread Guennadi Liakhovetski
it of a status change, e.g. upon a guest reboot. This patch makes that ioctl generic, while preserving its numeric value and also keeping the original alias. Signed-off-by: Guennadi Liakhovetski --- include/uapi/linux/vhost.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

  1   2   >