~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/xen/gntalloc.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/xen/gntalloc.h (Version linux-6.12-rc7) and /include/uapi/xen/gntalloc.h (Version linux-5.15.171)


  1 /*********************************************      1 /******************************************************************************
  2  * gntalloc.h                                       2  * gntalloc.h
  3  *                                                  3  *
  4  * Interface to /dev/xen/gntalloc.                  4  * Interface to /dev/xen/gntalloc.
  5  *                                                  5  *
  6  * Author: Daniel De Graaf <dgdegra@tycho.nsa.      6  * Author: Daniel De Graaf <dgdegra@tycho.nsa.gov>
  7  *                                                  7  *
  8  * This file is in the public domain.               8  * This file is in the public domain.
  9  */                                                 9  */
 10                                                    10 
 11 #ifndef __LINUX_PUBLIC_GNTALLOC_H__                11 #ifndef __LINUX_PUBLIC_GNTALLOC_H__
 12 #define __LINUX_PUBLIC_GNTALLOC_H__                12 #define __LINUX_PUBLIC_GNTALLOC_H__
 13                                                    13 
 14 #include <linux/types.h>                           14 #include <linux/types.h>
 15                                                    15 
 16 /*                                                 16 /*
 17  * Allocates a new page and creates a new gran     17  * Allocates a new page and creates a new grant reference.
 18  */                                                18  */
 19 #define IOCTL_GNTALLOC_ALLOC_GREF \                19 #define IOCTL_GNTALLOC_ALLOC_GREF \
 20 _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gn     20 _IOC(_IOC_NONE, 'G', 5, sizeof(struct ioctl_gntalloc_alloc_gref))
 21 struct ioctl_gntalloc_alloc_gref {                 21 struct ioctl_gntalloc_alloc_gref {
 22         /* IN parameters */                        22         /* IN parameters */
 23         /* The ID of the domain to be given ac     23         /* The ID of the domain to be given access to the grants. */
 24         __u16 domid;                               24         __u16 domid;
 25         /* Flags for this mapping */               25         /* Flags for this mapping */
 26         __u16 flags;                               26         __u16 flags;
 27         /* Number of pages to map */               27         /* Number of pages to map */
 28         __u32 count;                               28         __u32 count;
 29         /* OUT parameters */                       29         /* OUT parameters */
 30         /* The offset to be used on a subseque     30         /* The offset to be used on a subsequent call to mmap(). */
 31         __u64 index;                               31         __u64 index;
 32         /* The grant references of the newly c     32         /* The grant references of the newly created grant, one per page */
 33         /* Variable size, depending on count *     33         /* Variable size, depending on count */
 34         union {                                !!  34         __u32 gref_ids[1];
 35                 __u32 gref_ids[1];             << 
 36                 __DECLARE_FLEX_ARRAY(__u32, gr << 
 37         };                                     << 
 38 };                                                 35 };
 39                                                    36 
 40 #define GNTALLOC_FLAG_WRITABLE 1                   37 #define GNTALLOC_FLAG_WRITABLE 1
 41                                                    38 
 42 /*                                                 39 /*
 43  * Deallocates the grant reference, allowing t     40  * Deallocates the grant reference, allowing the associated page to be freed if
 44  * no other domains are using it.                  41  * no other domains are using it.
 45  */                                                42  */
 46 #define IOCTL_GNTALLOC_DEALLOC_GREF \              43 #define IOCTL_GNTALLOC_DEALLOC_GREF \
 47 _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gn     44 _IOC(_IOC_NONE, 'G', 6, sizeof(struct ioctl_gntalloc_dealloc_gref))
 48 struct ioctl_gntalloc_dealloc_gref {               45 struct ioctl_gntalloc_dealloc_gref {
 49         /* IN parameters */                        46         /* IN parameters */
 50         /* The offset returned in the map oper     47         /* The offset returned in the map operation */
 51         __u64 index;                               48         __u64 index;
 52         /* Number of references to unmap */        49         /* Number of references to unmap */
 53         __u32 count;                               50         __u32 count;
 54 };                                                 51 };
 55                                                    52 
 56 /*                                                 53 /*
 57  * Sets up an unmap notification within the pa     54  * Sets up an unmap notification within the page, so that the other side can do
 58  * cleanup if this side crashes. Required to i     55  * cleanup if this side crashes. Required to implement cross-domain robust
 59  * mutexes or close notification on communicat     56  * mutexes or close notification on communication channels.
 60  *                                                 57  *
 61  * Each mapped page only supports one notifica     58  * Each mapped page only supports one notification; multiple calls referring to
 62  * the same page overwrite the previous notifi     59  * the same page overwrite the previous notification. You must clear the
 63  * notification prior to the IOCTL_GNTALLOC_DE     60  * notification prior to the IOCTL_GNTALLOC_DEALLOC_GREF if you do not want it
 64  * to occur.                                       61  * to occur.
 65  */                                                62  */
 66 #define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY \          63 #define IOCTL_GNTALLOC_SET_UNMAP_NOTIFY \
 67 _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gn     64 _IOC(_IOC_NONE, 'G', 7, sizeof(struct ioctl_gntalloc_unmap_notify))
 68 struct ioctl_gntalloc_unmap_notify {               65 struct ioctl_gntalloc_unmap_notify {
 69         /* IN parameters */                        66         /* IN parameters */
 70         /* Offset in the file descriptor for a     67         /* Offset in the file descriptor for a byte within the page (same as
 71          * used in mmap). If using UNMAP_NOTIF     68          * used in mmap). If using UNMAP_NOTIFY_CLEAR_BYTE, this is the byte to
 72          * be cleared. Otherwise, it can be an     69          * be cleared. Otherwise, it can be any byte in the page whose
 73          * notification we are adjusting.          70          * notification we are adjusting.
 74          */                                        71          */
 75         __u64 index;                               72         __u64 index;
 76         /* Action(s) to take on unmap */           73         /* Action(s) to take on unmap */
 77         __u32 action;                              74         __u32 action;
 78         /* Event channel to notify */              75         /* Event channel to notify */
 79         __u32 event_channel_port;                  76         __u32 event_channel_port;
 80 };                                                 77 };
 81                                                    78 
 82 /* Clear (set to zero) the byte specified by i     79 /* Clear (set to zero) the byte specified by index */
 83 #define UNMAP_NOTIFY_CLEAR_BYTE 0x1                80 #define UNMAP_NOTIFY_CLEAR_BYTE 0x1
 84 /* Send an interrupt on the indicated event ch     81 /* Send an interrupt on the indicated event channel */
 85 #define UNMAP_NOTIFY_SEND_EVENT 0x2                82 #define UNMAP_NOTIFY_SEND_EVENT 0x2
 86                                                    83 
 87 #endif /* __LINUX_PUBLIC_GNTALLOC_H__ */           84 #endif /* __LINUX_PUBLIC_GNTALLOC_H__ */
 88                                                    85 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php