Re: [PATCH v3 9/9] xen/gntdev: Implement dma-buf import functionality

2018-06-14 Thread Boris Ostrovsky
On 06/13/2018 05:04 AM, Oleksandr Andrushchenko wrote: > On 06/13/2018 06:14 AM, Boris Ostrovsky wrote: >> >> >> On 06/12/2018 09:42 AM, Oleksandr Andrushchenko wrote: >> >>>   int gntdev_dmabuf_imp_release(struct gntdev_dmabuf_priv *priv, u32 >>> fd) >>>   { >>> -    return -EINVAL; >>> +   

Re: [PATCH v3 9/9] xen/gntdev: Implement dma-buf import functionality

2018-06-14 Thread Oleksandr Andrushchenko
On 06/14/2018 01:03 AM, Boris Ostrovsky wrote: On 06/13/2018 05:04 AM, Oleksandr Andrushchenko wrote: On 06/13/2018 06:14 AM, Boris Ostrovsky wrote: On 06/12/2018 09:42 AM, Oleksandr Andrushchenko wrote:   int gntdev_dmabuf_imp_release(struct gntdev_dmabuf_priv *priv, u32 fd)   { -   

Re: [PATCH v3 9/9] xen/gntdev: Implement dma-buf import functionality

2018-06-14 Thread Oleksandr Andrushchenko
On 06/13/2018 06:14 AM, Boris Ostrovsky wrote: On 06/12/2018 09:42 AM, Oleksandr Andrushchenko wrote:   int gntdev_dmabuf_imp_release(struct gntdev_dmabuf_priv *priv, u32 fd)   { -    return -EINVAL; +    struct gntdev_dmabuf *gntdev_dmabuf; +    struct dma_buf_attachment *attach; +   

Re: [PATCH v3 9/9] xen/gntdev: Implement dma-buf import functionality

2018-06-13 Thread Boris Ostrovsky
On 06/12/2018 09:42 AM, Oleksandr Andrushchenko wrote: int gntdev_dmabuf_imp_release(struct gntdev_dmabuf_priv *priv, u32 fd) { - return -EINVAL; + struct gntdev_dmabuf *gntdev_dmabuf; + struct dma_buf_attachment *attach; + struct dma_buf *dma_buf; + +

[PATCH v3 9/9] xen/gntdev: Implement dma-buf import functionality

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