]> git.proxmox.com Git - mirror_qemu.git/blobdiff - linux-headers/linux/userfaultfd.h
Update linux headers to v6.0-rc4
[mirror_qemu.git] / linux-headers / linux / userfaultfd.h
index 769b8379e44e42c504254ffb094c2fab479d901f..a3a377cd449137a370da582b44ed91c32fc711f9 100644 (file)
@@ -33,7 +33,8 @@
                           UFFD_FEATURE_THREAD_ID |             \
                           UFFD_FEATURE_MINOR_HUGETLBFS |       \
                           UFFD_FEATURE_MINOR_SHMEM |           \
-                          UFFD_FEATURE_EXACT_ADDRESS)
+                          UFFD_FEATURE_EXACT_ADDRESS |         \
+                          UFFD_FEATURE_WP_HUGETLBFS_SHMEM)
 #define UFFD_API_IOCTLS                                \
        ((__u64)1 << _UFFDIO_REGISTER |         \
         (__u64)1 << _UFFDIO_UNREGISTER |       \
@@ -47,7 +48,8 @@
 #define UFFD_API_RANGE_IOCTLS_BASIC            \
        ((__u64)1 << _UFFDIO_WAKE |             \
         (__u64)1 << _UFFDIO_COPY |             \
-        (__u64)1 << _UFFDIO_CONTINUE)
+        (__u64)1 << _UFFDIO_CONTINUE |         \
+        (__u64)1 << _UFFDIO_WRITEPROTECT)
 
 /*
  * Valid ioctl command number range with this API is from 0x00 to
@@ -194,6 +196,9 @@ struct uffdio_api {
         * UFFD_FEATURE_EXACT_ADDRESS indicates that the exact address of page
         * faults would be provided and the offset within the page would not be
         * masked.
+        *
+        * UFFD_FEATURE_WP_HUGETLBFS_SHMEM indicates that userfaultfd
+        * write-protection mode is supported on both shmem and hugetlbfs.
         */
 #define UFFD_FEATURE_PAGEFAULT_FLAG_WP         (1<<0)
 #define UFFD_FEATURE_EVENT_FORK                        (1<<1)
@@ -207,6 +212,7 @@ struct uffdio_api {
 #define UFFD_FEATURE_MINOR_HUGETLBFS           (1<<9)
 #define UFFD_FEATURE_MINOR_SHMEM               (1<<10)
 #define UFFD_FEATURE_EXACT_ADDRESS             (1<<11)
+#define UFFD_FEATURE_WP_HUGETLBFS_SHMEM                (1<<12)
        __u64 features;
 
        __u64 ioctls;