mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 08:05:12 +07:00
932d656217
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>
34 lines
930 B
C
34 lines
930 B
C
/* 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
|