summaryrefslogtreecommitdiffstats
path: root/include/uapi/xen/gntdev.h
diff options
context:
space:
mode:
authorOleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>2018-07-20 11:01:46 +0200
committerBoris Ostrovsky <boris.ostrovsky@oracle.com>2018-07-27 05:05:14 +0200
commit975ef7ff81bb000af6e6c8e63e81f89f3468dcf7 (patch)
tree4613c67c6a592e60631d0957a1e30133bf2a839c /include/uapi/xen/gntdev.h
parentxen/grant-table: Allow allocating buffers suitable for DMA (diff)
downloadlinux-975ef7ff81bb000af6e6c8e63e81f89f3468dcf7.tar.xz
linux-975ef7ff81bb000af6e6c8e63e81f89f3468dcf7.zip
xen/gntdev: Allow mappings for DMA buffers
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 <oleksandr_andrushchenko@epam.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'include/uapi/xen/gntdev.h')
-rw-r--r--include/uapi/xen/gntdev.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/uapi/xen/gntdev.h b/include/uapi/xen/gntdev.h
index 6d1163456c03..4b9d498a31d4 100644
--- a/include/uapi/xen/gntdev.h
+++ b/include/uapi/xen/gntdev.h
@@ -200,4 +200,19 @@ struct ioctl_gntdev_grant_copy {
/* Send an interrupt on the indicated event channel */
#define UNMAP_NOTIFY_SEND_EVENT 0x2
+/*
+ * Flags to be used while requesting memory mapping's backing storage
+ * to be allocated with DMA API.
+ */
+
+/*
+ * The buffer is backed with memory allocated with dma_alloc_wc.
+ */
+#define GNTDEV_DMA_FLAG_WC (1 << 0)
+
+/*
+ * The buffer is backed with memory allocated with dma_alloc_coherent.
+ */
+#define GNTDEV_DMA_FLAG_COHERENT (1 << 1)
+
#endif /* __LINUX_PUBLIC_GNTDEV_H__ */