Re: [PATCH v4 0/9] xen: dma-buf support for grant device

2018-07-02 Thread Oleksandr Andrushchenko
On 07/02/2018 11:20 AM, Juergen Gross wrote: On 02/07/18 09:10, Oleksandr Andrushchenko wrote: Hello, Boris, Juergen! Do you think I can re-base the series (which already has all required R-b's from Xen community) onto the latest kernel with API changes to patches 5 (of_dma_configure) and 8

Re: [PATCH v4 0/9] xen: dma-buf support for grant device

2018-07-02 Thread Oleksandr Andrushchenko
On 07/02/2018 11:20 AM, Juergen Gross wrote: On 02/07/18 09:10, Oleksandr Andrushchenko wrote: Hello, Boris, Juergen! Do you think I can re-base the series (which already has all required R-b's from Xen community) onto the latest kernel with API changes to patches 5 (of_dma_configure) and 8

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

2018-06-18 Thread Oleksandr Andrushchenko
On 06/18/2018 01:06 PM, Andre Przywara wrote: Hi, On 25/05/18 06:32, Oleksandr Andrushchenko wrote: On 05/23/2018 02:46 PM, Juergen Gross wrote: On 23/05/18 13:36, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Building for a 32-bit target results in warnings from casting

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

2018-06-18 Thread Oleksandr Andrushchenko
On 06/18/2018 01:06 PM, Andre Przywara wrote: Hi, On 25/05/18 06:32, Oleksandr Andrushchenko wrote: On 05/23/2018 02:46 PM, Juergen Gross wrote: On 23/05/18 13:36, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko Building for a 32-bit target results in warnings from casting

Re: [PATCH v4 0/9] xen: dma-buf support for grant device

2018-06-18 Thread Oleksandr Andrushchenko
Boris, Juergen! Thank you so much for your comments and time spent on this series. Appreciate that very much! Thank you, Oleksandr On 06/15/2018 09:27 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko This work is in response to my previous attempt to introduce Xen/DRM zero

Re: [PATCH v4 0/9] xen: dma-buf support for grant device

2018-06-18 Thread Oleksandr Andrushchenko
Boris, Juergen! Thank you so much for your comments and time spent on this series. Appreciate that very much! Thank you, Oleksandr On 06/15/2018 09:27 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko This work is in response to my previous attempt to introduce Xen/DRM zero

[PATCH] drm/xen-front: Replace NULL with error value in xen_drm_front_gem_get_sg_table

2018-06-15 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Dan Carpenter has reported that there is the following static checker warning: drivers/gpu/drm/drm_prime.c:317 drm_gem_map_dma_buf() warn: 'sgt' can also be NULL 314 sgt = obj->dev->driver->gem_prime_get_sg_table(obj); 315 316 if

[PATCH] drm/xen-front: Replace NULL with error value in xen_drm_front_gem_get_sg_table

2018-06-15 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Dan Carpenter has reported that there is the following static checker warning: drivers/gpu/drm/drm_prime.c:317 drm_gem_map_dma_buf() warn: 'sgt' can also be NULL 314 sgt = obj->dev->driver->gem_prime_get_sg_table(obj); 315 316 if

[PATCH v4 3/9] xen/balloon: Share common memory reservation routines

2018-06-15 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

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

2018-06-15 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

[PATCH v4 3/9] xen/balloon: Share common memory reservation routines

2018-06-15 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

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

2018-06-15 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

Re: [PATCH v5 1/3] xen: Sync up with the canonical protocol definitions in Xen

2018-06-13 Thread Oleksandr Andrushchenko
On 06/13/2018 09:40 AM, Juergen Gross wrote: On 13/06/18 08:13, Oleksandr Andrushchenko wrote: On 06/13/2018 09:11 AM, Dmitry Torokhov wrote: On June 12, 2018 10:49:31 PM PDT, Oleksandr Andrushchenko wrote: On 06/13/2018 02:40 AM, Dmitry Torokhov wrote: On Tue, Jun 12, 2018 at 03:46:10PM

Re: [PATCH v5 1/3] xen: Sync up with the canonical protocol definitions in Xen

2018-06-13 Thread Oleksandr Andrushchenko
On 06/13/2018 09:40 AM, Juergen Gross wrote: On 13/06/18 08:13, Oleksandr Andrushchenko wrote: On 06/13/2018 09:11 AM, Dmitry Torokhov wrote: On June 12, 2018 10:49:31 PM PDT, Oleksandr Andrushchenko wrote: On 06/13/2018 02:40 AM, Dmitry Torokhov wrote: On Tue, Jun 12, 2018 at 03:46:10PM

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

2018-06-11 Thread Oleksandr Andrushchenko
On 06/08/2018 10:21 PM, Boris Ostrovsky wrote: On 06/08/2018 01:59 PM, Stefano Stabellini wrote:    @@ -325,6 +401,14 @@ static int map_grant_pages(struct grant_map *map)    map->unmap_ops[i].handle = map->map_ops[i].handle;    if (use_ptemod)   

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

2018-06-11 Thread Oleksandr Andrushchenko
On 06/08/2018 10:21 PM, Boris Ostrovsky wrote: On 06/08/2018 01:59 PM, Stefano Stabellini wrote:    @@ -325,6 +401,14 @@ static int map_grant_pages(struct grant_map *map)    map->unmap_ops[i].handle = map->map_ops[i].handle;    if (use_ptemod)   

Re: [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: [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: [PATCH] drm: Fix possible race conditions while unplugging DRM device

2018-05-29 Thread Oleksandr Andrushchenko
ping On 05/22/2018 05:13 PM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko When unplugging a hotpluggable DRM device we first unregister it with drm_dev_unregister and then set drm_device.unplugged flag which is used to mark device critical sections with drm_dev_enter

Re: [PATCH] drm: Fix possible race conditions while unplugging DRM device

2018-05-29 Thread Oleksandr Andrushchenko
ping On 05/22/2018 05:13 PM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko When unplugging a hotpluggable DRM device we first unregister it with drm_dev_unregister and then set drm_device.unplugged flag which is used to mark device critical sections with drm_dev_enter

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

2018-05-28 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] [PATCH 3/8] drm/xen-front: fix 32-bit build warning

2018-05-28 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: [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: Oleksandr Andrushchenko

Re: [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: Oleksandr Andrushchenko

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

2018-05-25 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> 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

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

2018-05-25 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

[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

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

2018-05-25 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

[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

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

2018-05-25 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

[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

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

2018-05-25 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 module for the shared code and export corresponding

[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

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

2018-05-25 Thread Oleksandr Andrushchenko
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, but by providing GNTDEV_DMA_FLAG_XXX flags it can also be created as a DMA write-combine/coherent buffer, e.g. allocated

[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

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

2018-05-25 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.c| 116

[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

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

2018-05-25 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

[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

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

2018-05-25 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

[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]

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

2018-05-25 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

Re: [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

Re: [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 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

[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

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

2018-05-23 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko 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 Andrushchenko --- Changes since v1: - remove unneeded u64

Re: [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: [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 Building for a 32-bit target results in warnings from casting between

Re: [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

Re: [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 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

Re: [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: [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 09:02 PM, Boris Ostrovsky wrote: On 05/22/2018 11:00 AM, Oleksandr Andrushchenko wrote: 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

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

2018-05-22 Thread Oleksandr Andrushchenko
On 05/22/2018 09:02 PM, Boris Ostrovsky wrote: On 05/22/2018 11:00 AM, Oleksandr Andrushchenko wrote: 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

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 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

[PATCH] drm: Fix possible race conditions while unplugging DRM device

2018-05-22 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko <oleksandr_andrushche...@epam.com> When unplugging a hotpluggable DRM device we first unregister it with drm_dev_unregister and then set drm_device.unplugged flag which is used to mark device critical sections with drm_dev_enter()/ drm_dev_exit() preventing

[PATCH] drm: Fix possible race conditions while unplugging DRM device

2018-05-22 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko When unplugging a hotpluggable DRM device we first unregister it with drm_dev_unregister and then set drm_device.unplugged flag which is used to mark device critical sections with drm_dev_enter()/ drm_dev_exit() preventing access to device resources

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 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 Signed-off-by: Oleksandr Andrushchenko --- drivers/xen/gntdev.c | 954 +

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] [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: [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: [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 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

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 A commit message would be useful. Sure, v1 will have

[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

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

2018-05-21 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko 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 Andrushchenko --- drivers/gpu/drm/xen/xen_drm_front.h | 4

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 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 Signed-off-by: Oleksandr Andrushchenko --- drivers/xen/grant-table.c | 49 +++ include/xen/grant_table.h | 7 ++ 2

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] [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 A commit message would be useful. Sure, v1 will have it Signed-off-by: Oleksandr Andrushchenko for (i = 0; i < nr_pages

Re: [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

Re: [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

[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

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

2018-05-18 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko 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 example, if virtual keyboard device is exposed

[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

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

2018-05-18 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko 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 feature fields, so it is possible

Re: [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

Re: [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 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 3/3] xen/gntdev: Add support for Linux dma buffers

2018-05-17 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Signed-off-by: Oleksandr Andrushchenko --- drivers/xen/gntdev.c | 954 +- include/uapi/xen/gntdev.h | 101 include/xen/gntdev_exp.h | 23 + 3 files changed, 1066 insertions(+), 12 deletions(-) create mode 100644

[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 2/3] xen/grant-table: Extend API to work with DMA buffers

2018-05-17 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Signed-off-by: Oleksandr Andrushchenko --- drivers/xen/grant-table.c | 49 +++ include/xen/grant_table.h | 7 ++ 2 files changed, 56 insertions(+) diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index

[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

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

2018-05-17 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Signed-off-by: Oleksandr Andrushchenko --- drivers/xen/balloon.c | 214 +++--- drivers/xen/xen-balloon.c | 2 + include/xen/balloon.h | 11 +- 3 files changed, 188 insertions(+), 39 deletions(-) diff --git a/drivers/xen

[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 0/3] dma-buf support for gntdev

2018-05-17 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

Re: [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: [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: [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: [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: [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: [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: [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: [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 Trivial fix to spelling mistake in DRM_INFO message. Signed-off-by: Colin Ian King Thank you, Reviewed-by: Oleksandr Andrushchenko Will apply to drm-misc-next --- drivers/gpu/drm/xen/xen_drm_front.c | 2 +- 1 file changed

Re: [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: [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

<    1   2   3   4   5   6   7   8   9   >