Re: [Xen-devel][PATCH v4 1/1] cameraif: add ABI for para-virtual camera

2019-02-13 Thread Oleksandr Andrushchenko
Konrad, could you please review? So, I can send v5 with Hans' comments addressed Thank you, Oleksandr On 1/23/19 10:14 AM, Oleksandr Andrushchenko wrote: Any comments from Xen community? Konrad? On 1/15/19 4:44 PM, Hans Verkuil wrote: Hi Oleksandr, Just two remaining comments: On 1/

Re: [Xen-devel][PATCH v4 1/1] cameraif: add ABI for para-virtual camera

2019-02-05 Thread Oleksandr Andrushchenko
On 2/5/19 3:02 PM, Hans Verkuil wrote: On 2/5/19 1:30 PM, Oleksandr Andrushchenko wrote: Sorry for paying so much attention to this, but I think it is important that this is documented precisely. Thank you for helping with this - your comments are really important and make the description

Re: [Xen-devel][PATCH v4 1/1] cameraif: add ABI for para-virtual camera

2019-02-05 Thread Oleksandr Andrushchenko
On 2/5/19 2:14 PM, Hans Verkuil wrote: On 2/5/19 12:44 PM, Oleksandr Andrushchenko wrote: On 2/5/19 12:53 PM, Hans Verkuil wrote: On 2/5/19 11:44 AM, Oleksandr Andrushchenko wrote: On 2/5/19 11:34 AM, Hans Verkuil wrote: On 2/5/19 9:48 AM, Oleksandr Andrushchenko wrote: On 1/23/19 10:14 AM

Re: [Xen-devel][PATCH v4 1/1] cameraif: add ABI for para-virtual camera

2019-02-05 Thread Oleksandr Andrushchenko
On 2/5/19 12:53 PM, Hans Verkuil wrote: On 2/5/19 11:44 AM, Oleksandr Andrushchenko wrote: On 2/5/19 11:34 AM, Hans Verkuil wrote: On 2/5/19 9:48 AM, Oleksandr Andrushchenko wrote: On 1/23/19 10:14 AM, Oleksandr Andrushchenko wrote: Any comments from Xen community? Konrad? While I am still

Re: [Xen-devel][PATCH v4 1/1] cameraif: add ABI for para-virtual camera

2019-02-05 Thread Oleksandr Andrushchenko
On 2/5/19 11:34 AM, Hans Verkuil wrote: On 2/5/19 9:48 AM, Oleksandr Andrushchenko wrote: On 1/23/19 10:14 AM, Oleksandr Andrushchenko wrote: Any comments from Xen community? Konrad? While I am still looking forward to any comments from Xen community... On 1/15/19 4:44 PM, Hans Verkuil wrote

Re: [Xen-devel][PATCH v4 1/1] cameraif: add ABI for para-virtual camera

2019-02-05 Thread Oleksandr Andrushchenko
On 1/23/19 10:14 AM, Oleksandr Andrushchenko wrote: Any comments from Xen community? Konrad? While I am still looking forward to any comments from Xen community... On 1/15/19 4:44 PM, Hans Verkuil wrote: Hi Oleksandr, Just two remaining comments: On 1/15/19 10:38 AM, Oleksandr

Re: [Xen-devel][PATCH v4 0/1] cameraif: add ABI for para-virtual camera

2019-01-31 Thread Oleksandr Andrushchenko
Konrad, could you please review? Thank you, Oleksandr On 1/15/19 11:38 AM, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Hello! > > At the moment Xen [1] already supports some virtual multimedia > features [2] such as virtual display, sound. It

Re: [Xen-devel][PATCH v4 1/1] cameraif: add ABI for para-virtual camera

2019-01-23 Thread Oleksandr Andrushchenko
Any comments from Xen community? Konrad? On 1/15/19 4:44 PM, Hans Verkuil wrote: > Hi Oleksandr, > > Just two remaining comments: > > On 1/15/19 10:38 AM, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko >> >> This is the ABI for the two halve

Re: [Xen-devel][PATCH v4 1/1] cameraif: add ABI for para-virtual camera

2019-01-15 Thread Oleksandr Andrushchenko
On 1/15/19 4:44 PM, Hans Verkuil wrote: > Hi Oleksandr, Hello, Hans! > Just two remaining comments: > > On 1/15/19 10:38 AM, Oleksandr Andrushchenko wrote: >> From: Oleksandr Andrushchenko >> >> This is the ABI for the two halves of a para-virtualized >> cam

[Xen-devel][PATCH v4 0/1] cameraif: add ABI for para-virtual camera

2019-01-15 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Hello! At the moment Xen [1] already supports some virtual multimedia features [2] such as virtual display, sound. It supports keyboards, pointers and multi-touch devices all allowing Xen to be used in automotive appliances, In-Vehicle Infotainment (IVI) systems

[Xen-devel][PATCH v4 1/1] cameraif: add ABI for para-virtual camera

2019-01-15 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko This is the ABI for the two halves of a para-virtualized camera driver which extends Xen's reach multimedia capabilities even farther enabling it for video conferencing, In-Vehicle Infotainment, high definition maps etc. The initial goal is to support most n

Re: [Xen-devel][PATCH v3 1/1] cameraif: add ABI for para-virtual camera

2019-01-14 Thread Oleksandr Andrushchenko
Hello, Hans! Could you please take a look at my answers below and kindly let me know if we are ready for (final?) v4 from your point of view. Konrad, Xen-devel - do you have any objections/comments on this? Thank you, Oleksandr On 12/17/18 9:37 AM, Oleksandr Andrushchenko wrote: Hello, Hans

Re: [Xen-devel][PATCH v3 1/1] cameraif: add ABI for para-virtual camera

2018-12-16 Thread Oleksandr Andrushchenko
Hello, Hans! Thank you for reviewing, please find my answers inline On 12/14/18 2:14 PM, Hans Verkuil wrote: Hi Oleksandr, This is looking a lot better than v2. I do have a few remaining comments about some things that are a bit unclear to me. On 12/12/18 10:49 AM, Oleksandr Andrushchenko

Re: [Xen-devel][PATCH v3 1/1] cameraif: add ABI for para-virtual camera

2018-12-13 Thread Oleksandr Andrushchenko
PFA the diff between v2 and v3 for your convenience On 12/12/18 11:49 AM, Oleksandr Andrushchenko wrote: From: Oleksandr Andrushchenko This is the ABI for the two halves of a para-virtualized camera driver which extends Xen's reach multimedia capabilities even farther enabling it for

[Xen-devel][PATCH v3 1/1] cameraif: add ABI for para-virtual camera

2018-12-12 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko This is the ABI for the two halves of a para-virtualized camera driver which extends Xen's reach multimedia capabilities even farther enabling it for video conferencing, In-Vehicle Infotainment, high definition maps etc. The initial goal is to support most n

[Xen-devel][PATCH v3 0/1] cameraif: add ABI for para-virtual camera

2018-12-12 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko Hello! At the moment Xen [1] already supports some virtual multimedia features [2] such as virtual display, sound. It supports keyboards, pointers and multi-touch devices all allowing Xen to be used in automotive appliances, In-Vehicle Infotainment (IVI) systems

Re: Number of planes from fourcc code

2018-09-13 Thread Oleksandr Andrushchenko
On 09/13/2018 02:46 PM, Hans Verkuil wrote: On 09/13/18 13:29, Oleksandr Andrushchenko wrote: Hi, all! Is there a way in V4L2 to get number of planes from fourcc code or specifically I need number of planes for a given pixel format expressed as V4L2_PIX_FMT_* value. Sadly not. It's pa

Number of planes from fourcc code

2018-09-13 Thread Oleksandr Andrushchenko
Hi, all! Is there a way in V4L2 to get number of planes from fourcc code or specifically I need number of planes for a given pixel format expressed as V4L2_PIX_FMT_* value. I know that DRM has such a helper [1], but I am not quite sure if I can call it with V4L2_PIX_FMT_* as argument to get w

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)    map->kunmap_o

[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

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

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

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

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

2018-05-21 Thread Oleksandr Andrushchenko
d 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 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 A commit message would be useful. Sure, v1 will have it

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

[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 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 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 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: [RfC PATCH] Add udmabuf misc device

2018-04-16 Thread Oleksandr Andrushchenko
On 04/16/2018 12:32 PM, Daniel Vetter wrote: On Mon, Apr 16, 2018 at 10:22 AM, Oleksandr Andrushchenko wrote: On 04/16/2018 10:43 AM, Daniel Vetter wrote: On Mon, Apr 16, 2018 at 10:16:31AM +0300, Oleksandr Andrushchenko wrote: On 04/13/2018 06:37 PM, Daniel Vetter wrote: On Wed, Apr 11

Re: [RfC PATCH] Add udmabuf misc device

2018-04-16 Thread Oleksandr Andrushchenko
On 04/16/2018 10:43 AM, Daniel Vetter wrote: On Mon, Apr 16, 2018 at 10:16:31AM +0300, Oleksandr Andrushchenko wrote: On 04/13/2018 06:37 PM, Daniel Vetter wrote: On Wed, Apr 11, 2018 at 08:59:32AM +0300, Oleksandr Andrushchenko wrote: On 04/10/2018 08:26 PM, Dongwon Kim wrote: On Tue, Apr

Re: [RfC PATCH] Add udmabuf misc device

2018-04-16 Thread Oleksandr Andrushchenko
On 04/13/2018 06:37 PM, Daniel Vetter wrote: On Wed, Apr 11, 2018 at 08:59:32AM +0300, Oleksandr Andrushchenko wrote: On 04/10/2018 08:26 PM, Dongwon Kim wrote: On Tue, Apr 10, 2018 at 09:37:53AM +0300, Oleksandr Andrushchenko wrote: On 04/06/2018 09:57 PM, Dongwon Kim wrote: On Fri, Apr 06

Re: [RfC PATCH] Add udmabuf misc device

2018-04-10 Thread Oleksandr Andrushchenko
On 04/10/2018 08:26 PM, Dongwon Kim wrote: On Tue, Apr 10, 2018 at 09:37:53AM +0300, Oleksandr Andrushchenko wrote: On 04/06/2018 09:57 PM, Dongwon Kim wrote: On Fri, Apr 06, 2018 at 03:36:03PM +0300, Oleksandr Andrushchenko wrote: On 04/06/2018 02:57 PM, Gerd Hoffmann wrote: Hi, I fail

Re: [RfC PATCH] Add udmabuf misc device

2018-04-09 Thread Oleksandr Andrushchenko
On 04/06/2018 09:57 PM, Dongwon Kim wrote: On Fri, Apr 06, 2018 at 03:36:03PM +0300, Oleksandr Andrushchenko wrote: On 04/06/2018 02:57 PM, Gerd Hoffmann wrote: Hi, I fail to see any common ground for xen-zcopy and udmabuf ... Does the above mean you can assume that xen-zcopy and udmabuf

Re: [RfC PATCH] Add udmabuf misc device

2018-04-06 Thread Oleksandr Andrushchenko
On 04/06/2018 02:57 PM, Gerd Hoffmann wrote: Hi, I fail to see any common ground for xen-zcopy and udmabuf ... Does the above mean you can assume that xen-zcopy and udmabuf can co-exist as two different solutions? Well, udmabuf route isn't fully clear yet, but yes. See also gvt (intel vgp

Re: [RfC PATCH] Add udmabuf misc device

2018-04-06 Thread Oleksandr Andrushchenko
On 04/06/2018 12:07 PM, Gerd Hoffmann wrote: I'm not sure we can create something which works on both kvm and xen. The memory management model is quite different ... On xen the hypervisor manages all memory. Guests can allow other guests to access specific pages (using grant tables). In theor

Re: [RfC PATCH] Add udmabuf misc device

2018-04-06 Thread Oleksandr Andrushchenko
On 04/06/2018 12:07 PM, Gerd Hoffmann wrote: Hi, * The general interface should be able to express sharing from any guest:guest, not just guest:host. Arbitrary G:G sharing might be something some hypervisors simply aren't able to support, but the userspace API itself shoul

Re: [RfC PATCH] Add udmabuf misc device

2018-04-05 Thread Oleksandr Andrushchenko
For Xen we would love to see UAPI to create a dma-buf from grant references provided, so we can use this generic solution to implement zero-copying without breaking the existing Xen protocols. This can probably be extended to other hypervizors as well. Thank you, Oleksandr Andrushchenko a