diff options
Diffstat (limited to 'include/uapi/linux/userfaultfd.h')
| -rw-r--r-- | include/uapi/linux/userfaultfd.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/uapi/linux/userfaultfd.h b/include/uapi/linux/userfaultfd.h index c8953c84fdcc..79a85e5bd388 100644 --- a/include/uapi/linux/userfaultfd.h +++ b/include/uapi/linux/userfaultfd.h | |||
| @@ -18,7 +18,8 @@ | |||
| 18 | * means the userland is reading). | 18 | * means the userland is reading). |
| 19 | */ | 19 | */ |
| 20 | #define UFFD_API ((__u64)0xAA) | 20 | #define UFFD_API ((__u64)0xAA) |
| 21 | #define UFFD_API_FEATURES (UFFD_FEATURE_EVENT_FORK) | 21 | #define UFFD_API_FEATURES (UFFD_FEATURE_EVENT_FORK | \ |
| 22 | UFFD_FEATURE_EVENT_REMAP) | ||
| 22 | #define UFFD_API_IOCTLS \ | 23 | #define UFFD_API_IOCTLS \ |
| 23 | ((__u64)1 << _UFFDIO_REGISTER | \ | 24 | ((__u64)1 << _UFFDIO_REGISTER | \ |
| 24 | (__u64)1 << _UFFDIO_UNREGISTER | \ | 25 | (__u64)1 << _UFFDIO_UNREGISTER | \ |
| @@ -77,6 +78,12 @@ struct uffd_msg { | |||
| 77 | } fork; | 78 | } fork; |
| 78 | 79 | ||
| 79 | struct { | 80 | struct { |
| 81 | __u64 from; | ||
| 82 | __u64 to; | ||
| 83 | __u64 len; | ||
| 84 | } remap; | ||
| 85 | |||
| 86 | struct { | ||
| 80 | /* unused reserved fields */ | 87 | /* unused reserved fields */ |
| 81 | __u64 reserved1; | 88 | __u64 reserved1; |
| 82 | __u64 reserved2; | 89 | __u64 reserved2; |
| @@ -90,6 +97,7 @@ struct uffd_msg { | |||
| 90 | */ | 97 | */ |
| 91 | #define UFFD_EVENT_PAGEFAULT 0x12 | 98 | #define UFFD_EVENT_PAGEFAULT 0x12 |
| 92 | #define UFFD_EVENT_FORK 0x13 | 99 | #define UFFD_EVENT_FORK 0x13 |
| 100 | #define UFFD_EVENT_REMAP 0x14 | ||
| 93 | 101 | ||
| 94 | /* flags for UFFD_EVENT_PAGEFAULT */ | 102 | /* flags for UFFD_EVENT_PAGEFAULT */ |
| 95 | #define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */ | 103 | #define UFFD_PAGEFAULT_FLAG_WRITE (1<<0) /* If this was a write fault */ |
| @@ -110,6 +118,7 @@ struct uffdio_api { | |||
| 110 | */ | 118 | */ |
| 111 | #define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0) | 119 | #define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1<<0) |
| 112 | #define UFFD_FEATURE_EVENT_FORK (1<<1) | 120 | #define UFFD_FEATURE_EVENT_FORK (1<<1) |
| 121 | #define UFFD_FEATURE_EVENT_REMAP (1<<2) | ||
| 113 | __u64 features; | 122 | __u64 features; |
| 114 | 123 | ||
| 115 | __u64 ioctls; | 124 | __u64 ioctls; |
