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.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -200,4 +200,19 @@ struct ioctl_gntdev_grant_copy { · 199 unmodified lines | ||
| 200 | 200 | /* Send an interrupt on the indicated event channel */ |
| 201 | 201 | #define UNMAP_NOTIFY_SEND_EVENT 0x2 |
| 202 | 202 | |
| 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 | + | |
| 203 | 218 | #endif /* __LINUX_PUBLIC_GNTDEV_H__ */ |