struct ioctl_gntdev_grant_ref { /* The domain ID of the grant to be mapped. */
__u32 domid; /* The grant reference of the grant to be mapped. */
__u32 ref;
};
/* *Insertsthegrantreferencesintothemappingtableofaninstance *ofgntdev.N.B.Thisdoesnotperformthemapping,whichisdeferred *untilmmap()iscalledwith@indexastheoffset.@indexshouldbe *consideredopaquetouserspace,withoneexception:ifnogrant *referenceshaveeverbeeninsertedintothemappingtableofthis *instance,@indexwillbesetto0.Thisisnecessarytousegntdev *withuserspaceAPIsthatexpectafiledescriptorthatcanbe *mmap()'datoffset0,suchasWayland.If@countissetto0,this *ioctlwillfail.
*/ #define IOCTL_GNTDEV_MAP_GRANT_REF \
_IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref)) struct ioctl_gntdev_map_grant_ref { /* IN parameters */ /* The number of grants to be mapped. */
__u32 count;
__u32 pad; /* OUT parameters */ /* The offset to be used on a subsequent call to mmap(). */
__u64 index; /* Variable IN parameter. */ /* Array of grant references, of size @count. */ struct ioctl_gntdev_grant_ref refs[1];
};
/* *Removesthegrantreferencesfromthemappingtableofaninstanceof *gntdev.N.B.munmap()mustbecalledontherelevantvirtualaddress(es) *beforethisioctliscalled,oranerrorwillresult.
*/ #define IOCTL_GNTDEV_UNMAP_GRANT_REF \
_IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref)) struct ioctl_gntdev_unmap_grant_ref { /* IN parameters */ /* The offset was returned by the corresponding map operation. */
__u64 index; /* The number of pages to be unmapped. */
__u32 count;
__u32 pad;
};
/* *Returnstheoffsetinthedriver'saddressspacethatcorresponds *to@vaddr.Thiscanbeusedtoperformamunmap(),followedbyan *UNMAP_GRANT_REFioctl,wherenostateabouttheoffsetisretainedby *thecaller.Thenumberofpagesthatwereallocatedatthesametimeas *@vaddrisreturnedin@count. * *N.B.Wheremorethanonepagehasbeenmappedintoacontiguousrange,the *supplied@vaddrmustcorrespondtothestartoftherange;otherwise *anerrorwillresult.Itisonlypossibletomunmap()theentire *contiguously-allocatedrangeatonce,andnotanysubrangethereof.
*/ #define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR \
_IOC(_IOC_NONE, 'G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr)) struct ioctl_gntdev_get_offset_for_vaddr { /* IN parameters */ /* The virtual address of the first mapped page in a range. */
__u64 vaddr; /* OUT parameters */ /* The offset that was used in the initial mmap() operation. */
__u64 offset; /* The number of pages mapped in the VM area that begins at @vaddr. */
__u32 count;
__u32 pad;
};
/* *Setsthemaximumnumberofgrantsthatmaymappedatoncebythisgntdev *instance. * *N.B.Thismustbecalledbeforeanyotherioctlisperformedonthedevice.
*/ #define IOCTL_GNTDEV_SET_MAX_GRANTS \
_IOC(_IOC_NONE, 'G', 3, sizeof(struct ioctl_gntdev_set_max_grants)) struct ioctl_gntdev_set_max_grants { /* IN parameter */ /* The maximum number of grants that may be mapped at once. */
__u32 count;
};
/* *Setsupanunmapnotificationwithinthepage,sothattheothersidecando *cleanupifthissidecrashes.Requiredtoimplementcross-domainrobust *mutexesorclosenotificationoncommunicationchannels. * *Eachmappedpageonlysupportsonenotification;multiplecallsreferringto *thesamepageoverwritethepreviousnotification.Youmustclearthe *notificationpriortotheIOCTL_GNTALLOC_DEALLOC_GREFifyoudonotwantit *tooccur.
*/ #define IOCTL_GNTDEV_SET_UNMAP_NOTIFY \
_IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntdev_unmap_notify)) struct ioctl_gntdev_unmap_notify { /* IN parameters */ /* Offset in the file descriptor for a byte within the page (same as *usedinmmap).IfusingUNMAP_NOTIFY_CLEAR_BYTE,thisisthebyteto *becleared.Otherwise,itcanbeanybyteinthepagewhose *notificationweareadjusting.
*/
__u64 index; /* Action(s) to take on unmap */
__u32 action; /* Event channel to notify */
__u32 event_channel_port;
};
/* Clear (set to zero) the byte specified by index */ #define UNMAP_NOTIFY_CLEAR_BYTE 0x1 /* Send an interrupt on the indicated event channel */ #define UNMAP_NOTIFY_SEND_EVENT 0x2
#define IOCTL_GNTDEV_DMABUF_EXP_FROM_REFS \
_IOC(_IOC_NONE, 'G', 9, \ sizeof(struct ioctl_gntdev_dmabuf_exp_from_refs)) struct ioctl_gntdev_dmabuf_exp_from_refs { /* IN parameters. */ /* Specific options for this dma-buf: see GNTDEV_DMA_FLAG_XXX. */
__u32 flags; /* Number of grant references in @refs array. */
__u32 count; /* OUT parameters. */ /* File descriptor of the dma-buf. */
__u32 fd; /* The domain ID of the grant references to be mapped. */
__u32 domid; /* Variable IN parameter. */ /* Array of grant references of size @count. */
__u32 refs[1];
};
/* *Importadma-bufwithfiledescriptor@fdandexportgrantedreferences *tothepagesofthatdma-bufintoarray@refsofsize@count.
*/ #define IOCTL_GNTDEV_DMABUF_IMP_TO_REFS \
_IOC(_IOC_NONE, 'G', 11, \ sizeof(struct ioctl_gntdev_dmabuf_imp_to_refs)) struct ioctl_gntdev_dmabuf_imp_to_refs { /* IN parameters. */ /* File descriptor of the dma-buf. */
__u32 fd; /* Number of grant references in @refs array. */
__u32 count; /* The domain ID for which references to be granted. */
__u32 domid; /* Reserved - must be zero. */
__u32 reserved; /* OUT parameters. */ /* Array of grant references of size @count. */
__u32 refs[1];
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.