summaryrefslogtreecommitdiff
path: root/drivers/xen/gntdev-common.h
diff options
context:
space:
mode:
authorOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>2018-07-20 12:01:48 +0300
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>2018-07-26 23:05:14 -0400
commit932d6562179efe8e2460a0343dbe0fcacf288a9e (patch)
treeedaf27dad5042f971a9f098ca7c6217132e4d08c /drivers/xen/gntdev-common.h
parent1d314567553883d9f606cc59e8e66f465a4b6ccd (diff)
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.h6
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 {