History

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.

Oleksandr Andrushchenko committed 8 years ago

Commit 975ef7f1 parent 9bdc7302 files · +112 −2Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/xen/gntdev.h+15−0
@@ -200,4 +200,19 @@ struct ioctl_gntdev_grant_copy { · 199 unmodified lines
200200 /* Send an interrupt on the indicated event channel */
201201 #define UNMAP_NOTIFY_SEND_EVENT 0x2
202202
203+/*
204+ * Flags to be used while requesting memory mapping's backing storage
205+ * to be allocated with DMA API.
206+ */
207+
208+/*
209+ * The buffer is backed with memory allocated with dma_alloc_wc.
210+ */
211+#define GNTDEV_DMA_FLAG_WC (1 << 0)
212+
213+/*
214+ * The buffer is backed with memory allocated with dma_alloc_coherent.
215+ */
216+#define GNTDEV_DMA_FLAG_COHERENT (1 << 1)
217+
203218 #endif /* __LINUX_PUBLIC_GNTDEV_H__ */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t