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-dmabuf.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-dmabuf.h')
-rw-r--r-- | drivers/xen/gntdev-dmabuf.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/drivers/xen/gntdev-dmabuf.h b/drivers/xen/gntdev-dmabuf.h new file mode 100644 index 000000000000..7220a53d0fc5 --- /dev/null +++ b/drivers/xen/gntdev-dmabuf.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +/* + * Xen dma-buf functionality for gntdev. + * + * Copyright (c) 2018 Oleksandr Andrushchenko, EPAM Systems Inc. + */ + +#ifndef _GNTDEV_DMABUF_H +#define _GNTDEV_DMABUF_H + +#include <xen/gntdev.h> + +struct gntdev_dmabuf_priv; +struct gntdev_priv; + +struct gntdev_dmabuf_priv *gntdev_dmabuf_init(void); + +void gntdev_dmabuf_fini(struct gntdev_dmabuf_priv *priv); + +long gntdev_ioctl_dmabuf_exp_from_refs(struct gntdev_priv *priv, int use_ptemod, + struct ioctl_gntdev_dmabuf_exp_from_refs __user *u); + +long gntdev_ioctl_dmabuf_exp_wait_released(struct gntdev_priv *priv, + struct ioctl_gntdev_dmabuf_exp_wait_released __user *u); + +long gntdev_ioctl_dmabuf_imp_to_refs(struct gntdev_priv *priv, + struct ioctl_gntdev_dmabuf_imp_to_refs __user *u); + +long gntdev_ioctl_dmabuf_imp_release(struct gntdev_priv *priv, + struct ioctl_gntdev_dmabuf_imp_release __user *u); + +#endif |