[Xen-devel] [PATCH v2 1/9] xen/grant-table: Export gnttab_{alloc|free}_pages as GPL

2018-06-01 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Only gnttab_{alloc|free}_pages are exported as EXPORT_SYMBOL while all the rest are exported as EXPORT_SYMBOL_GPL, thus effectively making it not possible for non-GPL driver modules to use grant table module. Export gnttab_{alloc|free}_pages as EXPORT_SYMBOL_GPL so

[Xen-devel] [PATCH v2 5/9] xen/gntdev: Allow mappings for DMA buffers

2018-06-01 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Allow mappings for DMA backed buffers if grant table module supports such: this extends grant device to not only map buffers made of balloon pages, but also from buffers allocated with dma_alloc_xxx. Signed-off-by: Oleksandr Andrushchenko --- drivers/xen

[Xen-devel] [PATCH v2 2/9] xen/grant-table: Make set/clear page private code shared

2018-06-01 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Make set/clear page private code shared and accessible to other kernel modules which can re-use these instead of open-coding. Signed-off-by: Oleksandr Andrushchenko --- drivers/xen/grant-table.c | 54 +-- include/xen

[Xen-devel] [PATCH v2 0/9] xen: dma-buf support for grant device

2018-06-01 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko This work is in response to my previous attempt to introduce Xen/DRM zero-copy driver [1] to enable Linux dma-buf API [2] for Xen based frontends/backends. There is also an existing hyper_dmabuf approach available [3] which, if reworked to utilize the proposed

[Xen-devel] [PATCH v2 8/9] xen/gntdev: Implement dma-buf import functionality

2018-06-01 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko 1. Import a dma-buf with the file descriptor provided and export granted references to the pages of that dma-buf into the array of grant references. 2. Add API to close all references to an imported buffer, so it can be released by the owner. This is only

[Xen-devel] [PATCH v2 9/9] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use

2018-06-01 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module. Signed-off-by: Oleksandr Andrushchenko --- drivers/xen/gntdev-dmabuf.c | 6 +++ drivers/xen

[Xen-devel] [PATCH v2 3/9] xen/balloon: Share common memory reservation routines

2018-06-01 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Memory {increase|decrease}_reservation and VA mappings update/reset code used in balloon driver can be made common, so other drivers can also re-use the same functionality without open-coding. Create a dedicated file for the shared code and export corresponding

[Xen-devel] [PATCH v2 6/9] xen/gntdev: Add initial support for dma-buf UAPI

2018-06-01 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Add UAPI and IOCTLs for dma-buf grant device driver extension: the extension allows userspace processes and kernel modules to use Xen backed dma-buf implementation. With this extension grant references to the pages of an imported dma-buf can be exported for other

[Xen-devel] [PATCH v2 4/9] xen/grant-table: Allow allocating buffers suitable for DMA

2018-06-01 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Extend grant table module API to allow allocating buffers that can be used for DMA operations and mapping foreign grant references on top of those. The resulting buffer is similar to the one allocated by the balloon driver in terms that proper memory reservation

Re: [Xen-devel] [PATCH 0/8] xen: dma-buf support for grant device

2018-05-31 Thread Oleksandr Andrushchenko
On 05/31/2018 11:25 PM, Boris Ostrovsky wrote: On 05/31/2018 10:41 AM, Oleksandr Andrushchenko wrote: On 05/31/2018 08:51 AM, Oleksandr Andrushchenko wrote: On 05/31/2018 04:46 AM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: Oleksandr Andrushchenko (8

Re: [Xen-devel] [PATCH 0/8] xen: dma-buf support for grant device

2018-05-31 Thread Oleksandr Andrushchenko
On 05/31/2018 08:51 AM, Oleksandr Andrushchenko wrote: On 05/31/2018 04:46 AM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: Oleksandr Andrushchenko (8):    xen/grant-table: Make set/clear page private code shared    xen/balloon: Move common memory

Re: [Xen-devel] [PATCH 6/8] xen/gntdev: Implement dma-buf export functionality

2018-05-31 Thread Oleksandr Andrushchenko
On 05/31/2018 08:55 AM, Oleksandr Andrushchenko wrote: On 05/31/2018 02:10 AM, Dongwon Kim wrote: On Fri, May 25, 2018 at 06:33:29PM +0300, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko 1. Create a dma-buf from grant references provided by the foreign     domain. By default

Re: [Xen-devel] [PATCH 2/8] xen/balloon: Move common memory reservation routines to a module

2018-05-31 Thread Oleksandr Andrushchenko
On 05/31/2018 10:51 AM, Oleksandr Andrushchenko wrote: On 05/30/2018 10:24 PM, Boris Ostrovsky wrote: On 05/30/2018 01:46 PM, Oleksandr Andrushchenko wrote: On 05/30/2018 06:54 PM, Boris Ostrovsky wrote: BTW, I also think you can further simplify xenmem_reservation_va_mapping_* routines

Re: [Xen-devel] [PATCH] ALSA: xen-front: signdness bug in alsa_prepare()

2018-05-31 Thread Oleksandr Andrushchenko
On 05/31/2018 09:25 AM, Dan Carpenter wrote: "sndif_format" needs to be signed for the error handling to work. Fixes: 1cee559351a7 ("ALSA: xen-front: Implement ALSA virtual sound driver") Signed-off-by: Dan Carpenter diff --git a/sound/xen/xen_snd_front_alsa.c b/sound/xen/xen_snd_front_alsa.c

Re: [Xen-devel] [PATCH] ALSA: xen-front: fix a loop timeout

2018-05-31 Thread Oleksandr Andrushchenko
to--) + --to) msleep(10); if (!to) { Thank you for your patch, Reviewed-by: Oleksandr Andrushchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 6/8] xen/gntdev: Implement dma-buf export functionality

2018-05-30 Thread Oleksandr Andrushchenko
On 05/31/2018 02:10 AM, Dongwon Kim wrote: On Fri, May 25, 2018 at 06:33:29PM +0300, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko 1. Create a dma-buf from grant references provided by the foreign domain. By default dma-buf is backed by system memory pages

Re: [Xen-devel] [PATCH 0/8] xen: dma-buf support for grant device

2018-05-30 Thread Oleksandr Andrushchenko
On 05/31/2018 04:46 AM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: Oleksandr Andrushchenko (8):    xen/grant-table: Make set/clear page private code shared    xen/balloon: Move common memory reservation routines to a module    xen/grant-table: Allow

Re: [Xen-devel] [PATCH 1/8] xen/grant-table: Make set/clear page private code shared

2018-05-30 Thread Oleksandr Andrushchenko
On 05/31/2018 12:34 AM, Dongwon Kim wrote: On Fri, May 25, 2018 at 06:33:24PM +0300, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Make set/clear page private code shared and accessible to other kernel modules which can re-use these instead of open-coding. Signed-off

Re: [Xen-devel] [PATCH 3/8] xen/grant-table: Allow allocating buffers suitable for DMA

2018-05-30 Thread Oleksandr Andrushchenko
On 05/30/2018 06:20 PM, Boris Ostrovsky wrote: On 05/30/2018 02:34 AM, Oleksandr Andrushchenko wrote: On 05/29/2018 10:10 PM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: +/** + * gnttab_dma_free_pages - free DMAable pages + * @args: arguments to the function

Re: [Xen-devel] [PATCH 2/8] xen/balloon: Move common memory reservation routines to a module

2018-05-30 Thread Oleksandr Andrushchenko
On 05/30/2018 06:54 PM, Boris Ostrovsky wrote: On 05/30/2018 04:29 AM, Oleksandr Andrushchenko wrote: On 05/29/2018 11:03 PM, Boris Ostrovsky wrote: On 05/29/2018 02:22 PM, Oleksandr Andrushchenko wrote: On 05/29/2018 09:04 PM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr

Re: [Xen-devel] [PATCH] ALSA: xen-front: freeing an error pointer

2018-05-30 Thread Oleksandr Andrushchenko
k you for your patch, Reviewed-by: Oleksandr Andrushchenko ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH 8/8] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use

2018-05-30 Thread Oleksandr Andrushchenko
On 05/25/2018 06:33 PM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module. Signed-off-by: Oleksandr Andrushchenko

Re: [Xen-devel] [PATCH 2/8] xen/balloon: Move common memory reservation routines to a module

2018-05-30 Thread Oleksandr Andrushchenko
On 05/29/2018 11:03 PM, Boris Ostrovsky wrote: On 05/29/2018 02:22 PM, Oleksandr Andrushchenko wrote: On 05/29/2018 09:04 PM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: @@ -463,11 +457,6 @@ static enum bp_state increase_reservation(unsigned long nr_pages

Re: [Xen-devel] [PATCH 5/8] xen/gntdev: Add initial support for dma-buf UAPI

2018-05-30 Thread Oleksandr Andrushchenko
On 05/30/2018 01:34 AM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: +/* + * Create a dma-buf [1] from grant references @refs of count @count provided + * by the foreign domain @domid with flags @flags. + * + * By default dma-buf is backed by system memory

Re: [Xen-devel] [PATCH 5/8] xen/gntdev: Add initial support for dma-buf UAPI

2018-05-30 Thread Oleksandr Andrushchenko
On 05/25/2018 06:33 PM, Oleksandr Andrushchenko wrote: diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 3431fe210624..eaf63a2c7ae6 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -152,6 +152,16 @@ config XEN_GNTDEV help Allows userspace processes

Re: [Xen-devel] [PATCH 4/8] xen/gntdev: Allow mappings for DMA buffers

2018-05-30 Thread Oleksandr Andrushchenko
On 05/30/2018 12:52 AM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: struct unmap_notify { @@ -96,10 +104,28 @@ struct grant_map { struct gnttab_unmap_grant_ref *kunmap_ops; struct page **pages; unsigned long pages_vm_start

Re: [Xen-devel] [PATCH 3/8] xen/grant-table: Allow allocating buffers suitable for DMA

2018-05-30 Thread Oleksandr Andrushchenko
On 05/29/2018 10:10 PM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Extend grant table module API to allow allocating buffers that can be used for DMA operations and mapping foreign grant references on top of those. The resulting

Re: [Xen-devel] [PATCH 2/8] xen/balloon: Move common memory reservation routines to a module

2018-05-29 Thread Oleksandr Andrushchenko
On 05/30/2018 07:32 AM, Juergen Gross wrote: On 25/05/18 17:33, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Memory {increase|decrease}_reservation and VA mappings update/reset code used in balloon driver can be made common, so other drivers can also re-use the same

Re: [Xen-devel] [PATCH 1/8] xen/grant-table: Make set/clear page private code shared

2018-05-29 Thread Oleksandr Andrushchenko
On 05/30/2018 07:24 AM, Juergen Gross wrote: On 25/05/18 17:33, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Make set/clear page private code shared and accessible to other kernel modules which can re-use these instead of open-coding. Signed-off-by: Oleksandr Andrushchenko

Re: [Xen-devel] [PATCH 2/8] xen/balloon: Move common memory reservation routines to a module

2018-05-29 Thread Oleksandr Andrushchenko
On 05/29/2018 09:24 PM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: + +void xenmem_reservation_va_mapping_update(unsigned long count, + struct page **pages, + xen_pfn_t *frames

Re: [Xen-devel] [PATCH 2/8] xen/balloon: Move common memory reservation routines to a module

2018-05-29 Thread Oleksandr Andrushchenko
On 05/29/2018 09:04 PM, Boris Ostrovsky wrote: On 05/25/2018 11:33 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Memory {increase|decrease}_reservation and VA mappings update/reset code used in balloon driver can be made common, so other drivers can also re-use the same

Re: [Xen-devel] [PATCH 3/8] drm/xen-front: fix 32-bit build warning

2018-05-29 Thread Oleksandr Andrushchenko
Hi, On 05/25/2018 06:50 PM, Arnd Bergmann wrote: In 32-bit kernel builds, we cannot cast between a pointer and a 64-bit type: In file included from drivers/gpu/drm/xen/xen_drm_front_cfg.c:18: drivers/gpu/drm/xen/xen_drm_front.h: In function 'xen_drm_front_fb_to_cookie':

Re: [Xen-devel] [alsa-devel] [PATCH] ALSA: xen: ensure nul-terminated device name

2018-05-28 Thread Oleksandr Andrushchenko
if (!IS_ERR(str)) { - strncpy(pcm_instance->name, str, sizeof(pcm_instance->name)); + strlcpy(pcm_instance->name, str, sizeof(pcm_instance->name)); kfree(str); } Thank you for your patch, Reviewed-by

[Xen-devel] [PATCH 4/8] xen/gntdev: Allow mappings for DMA buffers

2018-05-25 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Allow mappings for DMA backed buffers if grant table module supports such: this extends grant device to not only map buffers made of balloon pages, but also from buffers allocated with dma_alloc_xxx. Signed-off-by: Ole

[Xen-devel] [PATCH 7/8] xen/gntdev: Implement dma-buf import functionality

2018-05-25 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> 1. Import a dma-buf with the file descriptor provided and export granted references to the pages of that dma-buf into the array of grant references. 2. Add API to close all references to an imported buffer, so

[Xen-devel] [PATCH 5/8] xen/gntdev: Add initial support for dma-buf UAPI

2018-05-25 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Add UAPI and IOCTLs for dma-buf grant device driver extension: the extension allows userspace processes and kernel modules to use Xen backed dma-buf implementation. With this extension grant references to the pages of an im

[Xen-devel] [PATCH 1/8] xen/grant-table: Make set/clear page private code shared

2018-05-25 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Make set/clear page private code shared and accessible to other kernel modules which can re-use these instead of open-coding. Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> --- drivers/xen/g

[Xen-devel] [PATCH 6/8] xen/gntdev: Implement dma-buf export functionality

2018-05-25 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> 1. Create a dma-buf from grant references provided by the foreign domain. By default dma-buf is backed by system memory pages, but by providing GNTDEV_DMA_FLAG_XXX flags it can also be created as a DMA write-c

[Xen-devel] [PATCH 2/8] xen/balloon: Move common memory reservation routines to a module

2018-05-25 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Memory {increase|decrease}_reservation and VA mappings update/reset code used in balloon driver can be made common, so other drivers can also re-use the same functionality without open-coding. Create a dedicated

[Xen-devel] [PATCH 8/8] xen/gntdev: Expose gntdev's dma-buf API for in-kernel use

2018-05-25 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Allow creating grant device context for use by kernel modules which require functionality, provided by gntdev. Export symbols for dma-buf API provided by the module. Signed-off-by: Oleksandr Andrushchenko <oleksandr_a

[Xen-devel] [PATCH 0/8] xen: dma-buf support for grant device

2018-05-25 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> This work is in response to my previous attempt to introduce Xen/DRM zero-copy driver [1] to enable Linux dma-buf API [2] for Xen based frontends/backends. There is also an existing hyper_dmabuf approach available [3]

Re: [Xen-devel] [PATCH v2] drm/xen-front: fix pointer casts

2018-05-24 Thread Oleksandr Andrushchenko
On 05/23/2018 02:46 PM, Juergen Gross wrote: On 23/05/18 13:36, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the wa

[Xen-devel] [PATCH v2] drm/xen-front: fix pointer casts

2018-05-23 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to uintptr_t first. Signed-off-by: Oleksandr Andrush

Re: [Xen-devel] [PATCH] drm/xen-front: fix pointer casts

2018-05-23 Thread Oleksandr Andrushchenko
On 05/23/2018 02:06 PM, Juergen Gross wrote: On 23/05/18 12:00, Oleksandr Andrushchenko wrote: On 05/23/2018 12:19 PM, Juergen Gross wrote: On 21/05/18 09:39, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Building for a 32-bit target r

Re: [Xen-devel] [PATCH] drm/xen-front: fix pointer casts

2018-05-23 Thread Oleksandr Andrushchenko
On 05/23/2018 12:19 PM, Juergen Gross wrote: On 21/05/18 09:39, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the wa

[Xen-devel] [PATCH 3/3] xen/displif: Add unique display connector identifier

2018-05-23 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> If frontend is configured to expose multiple connectors then backend may require a way to uniquely identify concrete virtual connector within the frontend. This is useful for use-cases where connector needs to be matched to ph

[Xen-devel] [PATCH 2/3] xen/kbdif: Add unique input device identifier

2018-05-23 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> If frontend is configured to expose multiple input device instances then backend may require a way to uniquely identify concrete input device within the frontend. This is useful for use-cases where virtual input device

Re: [Xen-devel] [PATCH v3 5/6] ALSA: xen-front: Implement ALSA virtual sound driver

2018-05-23 Thread Oleksandr Andrushchenko
On 05/23/2018 07:00 AM, Takashi Sakamoto wrote: Hi, On May 14 2018 15:27, Oleksandr Andrushchenko wrote: > diff --git a/sound/xen/xen_snd_front_alsa.c b/sound/xen/xen_snd_front_alsa.c > new file mode 100644 > index ..5041f83e98d2 > --- /dev/null >

Re: [Xen-devel] [RFC 1/3] xen/balloon: Allow allocating DMA buffers

2018-05-22 Thread Oleksandr Andrushchenko
On 05/22/2018 05:33 PM, Boris Ostrovsky wrote: On 05/22/2018 01:55 AM, Oleksandr Andrushchenko wrote: On 05/21/2018 11:36 PM, Boris Ostrovsky wrote: On 05/21/2018 03:13 PM, Oleksandr Andrushchenko wrote: On 05/21/2018 09:53 PM, Boris Ostrovsky wrote: On 05/21/2018 01:32 PM, Oleksandr

Re: [Xen-devel] [RFC 3/3] xen/gntdev: Add support for Linux dma buffers

2018-05-21 Thread Oleksandr Andrushchenko
you change it to something else like... "xen_"? Np, will rename On Thu, May 17, 2018 at 11:26:04AM +0300, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.co

Re: [Xen-devel] [RFC 1/3] xen/balloon: Allow allocating DMA buffers

2018-05-21 Thread Oleksandr Andrushchenko
On 05/21/2018 11:36 PM, Boris Ostrovsky wrote: On 05/21/2018 03:13 PM, Oleksandr Andrushchenko wrote: On 05/21/2018 09:53 PM, Boris Ostrovsky wrote: On 05/21/2018 01:32 PM, Oleksandr Andrushchenko wrote: On 05/21/2018 07:35 PM, Boris Ostrovsky wrote: On 05/21/2018 01:40 AM, Oleksandr

Re: [Xen-devel] [PATCH v3 4/6] ALSA: xen-front: Implement handling of shared buffers

2018-05-21 Thread Oleksandr Andrushchenko
On 05/21/2018 11:26 PM, Takashi Iwai wrote: On Thu, 17 May 2018 08:26:16 +0200, Takashi Iwai wrote: On Tue, 15 May 2018 08:02:08 +0200, Oleksandr Andrushchenko wrote: On 05/15/2018 09:01 AM, Takashi Iwai wrote: On Tue, 15 May 2018 07:46:38 +0200, Oleksandr Andrushchenko wrote: On 05/14/2018

Re: [Xen-devel] [RFC 1/3] xen/balloon: Allow allocating DMA buffers

2018-05-21 Thread Oleksandr Andrushchenko
On 05/21/2018 09:53 PM, Boris Ostrovsky wrote: On 05/21/2018 01:32 PM, Oleksandr Andrushchenko wrote: On 05/21/2018 07:35 PM, Boris Ostrovsky wrote: On 05/21/2018 01:40 AM, Oleksandr Andrushchenko wrote: On 05/19/2018 01:04 AM, Boris Ostrovsky wrote: On 05/17/2018 04:26 AM, Oleksandr

Re: [Xen-devel] [RFC 1/3] xen/balloon: Allow allocating DMA buffers

2018-05-21 Thread Oleksandr Andrushchenko
On 05/21/2018 07:35 PM, Boris Ostrovsky wrote: On 05/21/2018 01:40 AM, Oleksandr Andrushchenko wrote: On 05/19/2018 01:04 AM, Boris Ostrovsky wrote: On 05/17/2018 04:26 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> A commit message

[Xen-devel] [PATCH] drm/xen-front: fix pointer casts

2018-05-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Building for a 32-bit target results in warnings from casting between a 32-bit pointer and a 64-bit integer. Fix the warnings by casting those pointers to uintptr_t first. Signed-off-by: Oleksandr Andrush

Re: [Xen-devel] [RFC 2/3] xen/grant-table: Extend API to work with DMA buffers

2018-05-20 Thread Oleksandr Andrushchenko
On 05/19/2018 01:19 AM, Boris Ostrovsky wrote: On 05/17/2018 04:26 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> --- drivers/xen/grant-

Re: [Xen-devel] [RFC 1/3] xen/balloon: Allow allocating DMA buffers

2018-05-20 Thread Oleksandr Andrushchenko
On 05/19/2018 01:04 AM, Boris Ostrovsky wrote: On 05/17/2018 04:26 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> A commit message would be useful. Sure, v1 will have it Signed-off-by: Oleksandr Andrushchenko <oleksandr_a

Re: [Xen-devel] [PATCH v4 2/2] Input: xen-kbdfront - allow better run-time configuration

2018-05-18 Thread Oleksandr Andrushchenko
Sorry for top posting. Due to a bug in the test used to verify this patch I need to make two more changes, please see inline. Please ignore this patch for now, I will send v5 soon. Sorry for inconvenience, Oleksandr On 05/18/2018 12:59 PM, Oleksandr Andrushchenko wrote: From: Oleksandr

[Xen-devel] [PATCH v4 1/2] xen/kbdif: Sync up with the canonical definition in Xen

2018-05-18 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> This is the sync up with the canonical definition of the keyboard protocol in Xen: 1. Add missing string constants for {feature|request}-raw-pointer to align with the rest of the interface file. 2. Add new XenStore f

[Xen-devel] [PATCH v4 2/2] Input: xen-kbdfront - allow better run-time configuration

2018-05-18 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> It is now only possible to control if multi-touch virtual device is created or not (via the corresponding XenStore entries), but keyboard and pointer devices are always created. In some cases this is not desirable. For e

Re: [Xen-devel] [PATCH v4 2/2] xen/kbdif: Add features to disable keyboard and pointer

2018-05-17 Thread Oleksandr Andrushchenko
On 05/17/2018 05:09 PM, Konrad Rzeszutek Wilk wrote: On Thu, May 17, 2018 at 08:51:38AM +0300, Oleksandr Andrushchenko wrote: On 05/17/2018 08:50 AM, Juergen Gross wrote: On 17/05/18 07:45, Oleksandr Andrushchenko wrote: Hi, Juergen! This patch should go into 4.11 as it is needed

Re: [Xen-devel] [PATCH v3 2/2] Input: xen-kbdfront - allow better run-time configuration

2018-05-17 Thread Oleksandr Andrushchenko
On 05/17/2018 04:08 PM, Boris Ostrovsky wrote: On 05/17/2018 01:31 AM, Oleksandr Andrushchenko wrote: I will go with the change you suggested and I'll send v4 tomorrow then. Please make sure your changes to kbdif.h are in Xen first. I believe you submitted a patch there but I don't see

[Xen-devel] [RFC 0/3] dma-buf support for gntdev

2018-05-17 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> This work is in response to my previous attempt to introduce Xen/DRM zero-copy driver [1] to enable Linux dma-buf API [2] for Xen based frontends/backends. There is also an existing hyper_dmabuf approach available [3]

[Xen-devel] [RFC 2/3] xen/grant-table: Extend API to work with DMA buffers

2018-05-17 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> --- drivers/xen/grant-table.c | 49 +++ include/xen/grant_table.h | 7 ++ 2 files changed, 56 inserti

[Xen-devel] [RFC 3/3] xen/gntdev: Add support for Linux dma buffers

2018-05-17 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> --- drivers/xen/gntdev.c | 954 +- include/uapi/xen/gntdev.h | 101 include/xen/gntdev_exp.h | 2

[Xen-devel] [RFC 1/3] xen/balloon: Allow allocating DMA buffers

2018-05-17 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> --- drivers/xen/balloon.c | 214 +++--- drivers/xen/xen-balloon.c | 2 + include/xen/balloon.h | 11

Re: [Xen-devel] [PATCH v3 4/6] ALSA: xen-front: Implement handling of shared buffers

2018-05-17 Thread Oleksandr Andrushchenko
On 05/17/2018 09:26 AM, Takashi Iwai wrote: On Tue, 15 May 2018 08:02:08 +0200, Oleksandr Andrushchenko wrote: On 05/15/2018 09:01 AM, Takashi Iwai wrote: On Tue, 15 May 2018 07:46:38 +0200, Oleksandr Andrushchenko wrote: On 05/14/2018 11:28 PM, Takashi Iwai wrote: On Mon, 14 May 2018 08:27

Re: [Xen-devel] [PATCH v4 2/2] xen/kbdif: Add features to disable keyboard and pointer

2018-05-16 Thread Oleksandr Andrushchenko
On 05/17/2018 08:50 AM, Juergen Gross wrote: On 17/05/18 07:45, Oleksandr Andrushchenko wrote: Hi, Juergen! This patch should go into 4.11 as it is needed for a related Linux kernel patch and the risk is next to zero for Xen due to only adding some macros not in use on Xen side. Could you

Re: [Xen-devel] [PATCH v4 1/2] xen/kbdif: Add string constants for raw pointer

2018-05-16 Thread Oleksandr Andrushchenko
On 05/17/2018 08:42 AM, Juergen Gross wrote: On 17/05/18 07:29, Oleksandr Andrushchenko wrote: On 05/17/2018 07:28 AM, Juergen Gross wrote: On 16/05/18 06:59, Oleksandr Andrushchenko wrote: On 05/11/2018 06:15 PM, Juergen Gross wrote: On 11/05/18 15:38, Konrad Rzeszutek Wilk wrote: On Fri

Re: [Xen-devel] [PATCH v4 2/2] xen/kbdif: Add features to disable keyboard and pointer

2018-05-16 Thread Oleksandr Andrushchenko
Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> It is now not fully possible to control if and which virtual devices are created by the frontend, e.g. keyboard and pointer devices are always created and multi-touch device is created if the backend advertises

Re: [Xen-devel] [PATCH v3 2/2] Input: xen-kbdfront - allow better run-time configuration

2018-05-16 Thread Oleksandr Andrushchenko
On 05/17/2018 12:08 AM, Dmitry Torokhov wrote: On Wed, May 16, 2018 at 08:47:30PM +0300, Oleksandr Andrushchenko wrote: On 05/16/2018 08:15 PM, Dmitry Torokhov wrote: Hi Oleksandr, On Mon, May 14, 2018 at 05:40:29PM +0300, Oleksandr Andrushchenko wrote: @@ -211,93 +220,114 @@ static int

Re: [Xen-devel] [PATCH v4 1/2] xen/kbdif: Add string constants for raw pointer

2018-05-16 Thread Oleksandr Andrushchenko
On 05/17/2018 07:28 AM, Juergen Gross wrote: On 16/05/18 06:59, Oleksandr Andrushchenko wrote: On 05/11/2018 06:15 PM, Juergen Gross wrote: On 11/05/18 15:38, Konrad Rzeszutek Wilk wrote: On Fri, May 11, 2018 at 09:37:57AM -0400, Konrad Rzeszutek Wilk wrote: On Wed, May 02, 2018 at 05:49

Re: [Xen-devel] [PATCH v3 2/2] Input: xen-kbdfront - allow better run-time configuration

2018-05-16 Thread Oleksandr Andrushchenko
On 05/16/2018 08:15 PM, Dmitry Torokhov wrote: Hi Oleksandr, On Mon, May 14, 2018 at 05:40:29PM +0300, Oleksandr Andrushchenko wrote: @@ -211,93 +220,114 @@ static int xenkbd_probe(struct xenbus_device *dev, if (!info->page) goto error_nomem; - /* Set input

Re: [Xen-devel] [PATCH v4 1/2] xen/kbdif: Add string constants for raw pointer

2018-05-15 Thread Oleksandr Andrushchenko
On 05/11/2018 06:15 PM, Juergen Gross wrote: On 11/05/18 15:38, Konrad Rzeszutek Wilk wrote: On Fri, May 11, 2018 at 09:37:57AM -0400, Konrad Rzeszutek Wilk wrote: On Wed, May 02, 2018 at 05:49:18PM +0300, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrush

Re: [Xen-devel] [PATCH][next] drm/xen-front: fix spelling mistake: "conector" -> "connector"

2018-05-15 Thread Oleksandr Andrushchenko
On 05/15/2018 11:54 AM, Colin King wrote: From: Colin Ian King <colin.k...@canonical.com> Trivial fix to spelling mistake in DRM_INFO message. Signed-off-by: Colin Ian King <colin.k...@canonical.com> Thank you, Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrush

Re: [Xen-devel] [PATCH v3 4/6] ALSA: xen-front: Implement handling of shared buffers

2018-05-15 Thread Oleksandr Andrushchenko
On 05/15/2018 09:01 AM, Takashi Iwai wrote: On Tue, 15 May 2018 07:46:38 +0200, Oleksandr Andrushchenko wrote: On 05/14/2018 11:28 PM, Takashi Iwai wrote: On Mon, 14 May 2018 08:27:40 +0200, Oleksandr Andrushchenko wrote: --- /dev/null +++ b/sound/xen/xen_snd_front_shbuf.c @@ -0,0 +1,193

Re: [Xen-devel] [PATCH v3 4/6] ALSA: xen-front: Implement handling of shared buffers

2018-05-14 Thread Oleksandr Andrushchenko
On 05/14/2018 11:28 PM, Takashi Iwai wrote: On Mon, 14 May 2018 08:27:40 +0200, Oleksandr Andrushchenko wrote: --- /dev/null +++ b/sound/xen/xen_snd_front_shbuf.c @@ -0,0 +1,193 @@ +// SPDX-License-Identifier: GPL-2.0 OR MIT + +/* + * Xen para-virtual sound device + * + * Copyright (C) 2016

Re: [Xen-devel] [alsa-devel] [PATCH v3 0/6] ALSA: xen-front: Add Xen para-virtualized frontend driver

2018-05-14 Thread Oleksandr Andrushchenko
On 05/14/2018 06:52 PM, Takashi Iwai wrote: On Mon, 14 May 2018 08:27:36 +0200, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Please note: this patch series depends on [3]. This patch series adds support for Xen [1] para-virtualized

[Xen-devel] [PATCH v3 2/2] Input: xen-kbdfront - allow better run-time configuration

2018-05-14 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> It is now only possible to control if multi-touch virtual device is created or not (via the corresponding XenStore entries), but keyboard and pointer devices are always created. In some cases this is not desirable. For e

[Xen-devel] [PATCH v3 1/2] xen/kbdif: Sync up with the canonical definition in Xen

2018-05-14 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> This is the sync up with the canonical definition of the keyboard protocol in Xen: 1. Add missing string constants for {feature|request}-raw-pointer to align with the rest of the interface file. 2. Add new XenStore f

[Xen-devel] [PATCH v3 4/6] ALSA: xen-front: Implement handling of shared buffers

2018-05-14 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Implement shared buffer handling according to the para-virtualized sound device protocol at xen/interface/io/sndif.h: - manage buffer memory - handle granted references - handle page directories Signed-off-by: Ole

[Xen-devel] [PATCH v3 3/6] ALSA: xen-front: Implement Xen event channel handling

2018-05-14 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Handle Xen event channels: - create for all configured streams and publish corresponding ring references and event channels in Xen store, so backend can connect - implement event channels interrupt handlers -

[Xen-devel] [PATCH v3 0/6] ALSA: xen-front: Add Xen para-virtualized frontend driver

2018-05-14 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Please note: this patch series depends on [3]. This patch series adds support for Xen [1] para-virtualized sound frontend driver. It implements the protocol from include/xen/interface/io/sndif.h with the following limit

[Xen-devel] [PATCH v3 5/6] ALSA: xen-front: Implement ALSA virtual sound driver

2018-05-14 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Implement essential initialization of the sound driver: - introduce required data structures - handle driver registration - handle sound card registration - register sound driver on backend connection - remove sound

[Xen-devel] [PATCH v3 1/6] ALSA: xen-front: Introduce Xen para-virtualized sound frontend driver

2018-05-14 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Introduce skeleton of the para-virtualized Xen sound frontend driver. Initial handling for Xen bus states: implement Xen bus state machine for the frontend driver according to the state diagram and recovery flow from soun

[Xen-devel] [PATCH v3 2/6] ALSA: xen-front: Read sound driver configuration from Xen store

2018-05-14 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Read configuration values from Xen store according to xen/interface/io/sndif.h protocol: - introduce configuration structures for different components, e.g. sound card, device, stream - read PCM HW parameters, e.

[Xen-devel] [PATCH v3 6/6] MAINTAINERS: Add ALSA: xen-front: maintainer entry

2018-05-14 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Add myself as sound/xen maintainer. Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

Re: [Xen-devel] [PATCH 1/3] drm/xen-front: checking for NULL instead of IS_ERR

2018-05-08 Thread Oleksandr Andrushchenko
On 05/08/2018 12:34 PM, Oleksandr Andrushchenko wrote: On 05/08/2018 12:26 PM, Dan Carpenter wrote: drm_dev_alloc() returns error pointers, it never returns NULL. Fixes: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend") Signed-off-by: Dan Carpenter &

Re: [Xen-devel] [PATCH 3/3] drm/xen-front: Fix loop timeout

2018-05-08 Thread Oleksandr Andrushchenko
On 05/08/2018 12:37 PM, Oleksandr Andrushchenko wrote: On 05/08/2018 12:28 PM, Dan Carpenter wrote: If the loop times out then we want to exit with "to" set to zero, but in the current code it's set to -1. Fixes: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display fro

Re: [Xen-devel] [PATCH 2/3] drm/xen-front: fix xen_drm_front_shbuf_alloc() error handling

2018-05-08 Thread Oleksandr Andrushchenko
On 05/08/2018 12:37 PM, Oleksandr Andrushchenko wrote: On 05/08/2018 12:27 PM, Dan Carpenter wrote: The xen_drm_front_shbuf_alloc() function was returning a mix of error pointers and NULL and the the caller wasn't checking correctly. I've changed it to always return error pointer consistently

Re: [Xen-devel] [PATCH 3/3] drm/xen-front: Fix loop timeout

2018-05-08 Thread Oleksandr Andrushchenko
n...@oracle.com> Thank you, Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c index 378cb7ce0db5..3345ac71b391 100644 --- a/drivers/gpu/drm/xen/xen_drm_front.c +++ b/drivers/gpu/d

Re: [Xen-devel] [PATCH 1/3] drm/xen-front: checking for NULL instead of IS_ERR

2018-05-08 Thread Oleksandr Andrushchenko
On 05/08/2018 12:26 PM, Dan Carpenter wrote: drm_dev_alloc() returns error pointers, it never returns NULL. Fixes: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Thank you, Reviewed-by: Oleksan

Re: [Xen-devel] [PATCH v4 1/2] xen/kbdif: Add string constants for raw pointer

2018-05-07 Thread Oleksandr Andrushchenko
Konrad? On 05/02/2018 05:49 PM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Add missing string constants for {feature|request}-raw-pointer to align with the rest of the interface file. Fixes 7868654ff7fe ("kbdif: Define "fea

[Xen-devel] [PATCH v4 2/2] xen/kbdif: Add features to disable keyboard and pointer

2018-05-02 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> It is now not fully possible to control if and which virtual devices are created by the frontend, e.g. keyboard and pointer devices are always created and multi-touch device is created if the backend advertises multi-touch s

[Xen-devel] [PATCH v4 1/2] xen/kbdif: Add string constants for raw pointer

2018-05-02 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Add missing string constants for {feature|request}-raw-pointer to align with the rest of the interface file. Fixes 7868654ff7fe ("kbdif: Define "feature-raw-pointer" and "request-raw-pointer&q

Re: [Xen-devel] [PATCH v3] xen/kbdif: Add features to disable keyboard and pointer

2018-05-02 Thread Oleksandr Andrushchenko
On 05/02/2018 04:58 PM, Konrad Rzeszutek Wilk wrote: On Wed, May 02, 2018 at 10:16:08AM +0300, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> It is now not fully possible to control if and which virtual devices are created by the fronten

Re: [Xen-devel] [PATCH v2 0/5] ALSA: xen-front: Add Xen para-virtualized frontend driver

2018-05-02 Thread Oleksandr Andrushchenko
Gentle reminder... I think that Xen side comments are already there and still I miss some input from ALSA community on patch #5. Thank you, Oleksandr On 04/16/2018 09:24 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> Pleas

Re: [Xen-devel] [PATCH] xen: Add RING_COPY_RESPONSE()

2018-05-02 Thread Oleksandr Andrushchenko
On 05/02/2018 10:19 AM, Jan Beulich wrote: On 02.05.18 at 07:29, wrote: On 05/01/2018 12:54 AM, Marek Marczykowski-Górecki wrote: Using RING_GET_RESPONSE() on a shared ring is easy to use incorrectly (i.e., by not considering that the other end may alter the data in the

[Xen-devel] [PATCH v3] xen/kbdif: Add features to disable keyboard and pointer

2018-05-02 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> It is now not fully possible to control if and which virtual devices are created by the frontend, e.g. keyboard and pointer devices are always created and multi-touch device is created if the backend advertises multi-touch s

Re: [Xen-devel] [PATCH] xen: Add RING_COPY_RESPONSE()

2018-05-01 Thread Oleksandr Andrushchenko
On 05/01/2018 12:54 AM, Marek Marczykowski-Górecki wrote: Using RING_GET_RESPONSE() on a shared ring is easy to use incorrectly (i.e., by not considering that the other end may alter the data in the shared ring while it is being inspected). Safe usage of a response generally requires taking a

<    7   8   9   10   11   12   13   14   15   >