123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202 |
- #ifndef __LINUX_PUBLIC_GNTDEV_H__
- #define __LINUX_PUBLIC_GNTDEV_H__
- #include <linux/types.h>
- struct ioctl_gntdev_grant_ref {
-
- __u32 domid;
-
- __u32 ref;
- };
- #define IOCTL_GNTDEV_MAP_GRANT_REF \
- _IOC(_IOC_NONE, 'G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
- struct ioctl_gntdev_map_grant_ref {
-
-
- __u32 count;
- __u32 pad;
-
-
- __u64 index;
-
-
- struct ioctl_gntdev_grant_ref refs[1];
- };
- #define IOCTL_GNTDEV_UNMAP_GRANT_REF \
- _IOC(_IOC_NONE, 'G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))
- struct ioctl_gntdev_unmap_grant_ref {
-
-
- __u64 index;
-
- __u32 count;
- __u32 pad;
- };
- #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 {
-
-
- __u64 vaddr;
-
-
- __u64 offset;
-
- __u32 count;
- __u32 pad;
- };
- #define IOCTL_GNTDEV_SET_MAX_GRANTS \
- _IOC(_IOC_NONE, 'G', 3, sizeof(struct ioctl_gntdev_set_max_grants))
- struct ioctl_gntdev_set_max_grants {
-
-
- __u32 count;
- };
- #define IOCTL_GNTDEV_SET_UNMAP_NOTIFY \
- _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntdev_unmap_notify))
- struct ioctl_gntdev_unmap_notify {
-
-
- __u64 index;
-
- __u32 action;
-
- __u32 event_channel_port;
- };
- struct gntdev_grant_copy_segment {
- union {
- void *virt;
- struct {
- grant_ref_t ref;
- __u16 offset;
- domid_t domid;
- } foreign;
- } source, dest;
- __u16 len;
- __u16 flags;
- __s16 status;
- };
- #define IOCTL_GNTDEV_GRANT_COPY \
- _IOC(_IOC_NONE, 'G', 8, sizeof(struct ioctl_gntdev_grant_copy))
- struct ioctl_gntdev_grant_copy {
- unsigned int count;
- struct gntdev_grant_copy_segment *segments;
- };
- #define UNMAP_NOTIFY_CLEAR_BYTE 0x1
- #define UNMAP_NOTIFY_SEND_EVENT 0x2
- #endif
|