diff options
author | Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> | 2018-07-20 11:01:48 +0200 |
---|---|---|
committer | Boris Ostrovsky <boris.ostrovsky@oracle.com> | 2018-07-27 05:05:14 +0200 |
commit | 932d6562179efe8e2460a0343dbe0fcacf288a9e (patch) | |
tree | edaf27dad5042f971a9f098ca7c6217132e4d08c /drivers/xen/gntdev-common.h | |
parent | xen/gntdev: Make private routines/structures accessible (diff) | |
download | linux-932d6562179efe8e2460a0343dbe0fcacf288a9e.tar.xz linux-932d6562179efe8e2460a0343dbe0fcacf288a9e.zip |
xen/gntdev: Add initial support for dma-buf UAPI
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 domain use and grant references coming from a foreign
domain can be converted into a local dma-buf for local export.
Implement basic initialization and stubs for Xen DMA buffers'
support.
Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'drivers/xen/gntdev-common.h')
-rw-r--r-- | drivers/xen/gntdev-common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/xen/gntdev-common.h b/drivers/xen/gntdev-common.h index 2346c198f72e..2f8b949c3eeb 100644 --- a/drivers/xen/gntdev-common.h +++ b/drivers/xen/gntdev-common.h @@ -16,6 +16,8 @@ #include <linux/mmu_notifier.h> #include <linux/types.h> +struct gntdev_dmabuf_priv; + struct gntdev_priv { /* Maps with visible offsets in the file descriptor. */ struct list_head maps; @@ -33,6 +35,10 @@ struct gntdev_priv { /* Device for which DMA memory is allocated. */ struct device *dma_dev; #endif + +#ifdef CONFIG_XEN_GNTDEV_DMABUF + struct gntdev_dmabuf_priv *dmabuf_priv; +#endif }; struct gntdev_unmap_notify { |