Signed-off-by: Mike Rapoport <rppt@xxxxxxxxxxxxxxxxxx> --- man2/ioctl_userfaultfd.2 | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/man2/ioctl_userfaultfd.2 b/man2/ioctl_userfaultfd.2 index 78abc4d..dade631 100644 --- a/man2/ioctl_userfaultfd.2 +++ b/man2/ioctl_userfaultfd.2 @@ -95,11 +95,6 @@ struct uffdio_api { The .I api field denotes the API version requested by the application. -Before the call, the -.I features -field must be initialized to zero. -In the future, it is intended that this field can be used to ask -whether particular features are supported. The kernel verifies that it can support the requested API version, and sets the @@ -109,9 +104,40 @@ and fields to bit masks representing all the available features and the generic .BR ioctl (2) operations available. -Currently, zero (i.e., no feature bits) is placed in the + +For Linux kernel versions before 4.11, the +.I features +field must be initialized to zero before the call to +.I UFFDIO_API +, and zero (i.e., no feature bits) is placed in the +.I features +field by the kernel upon return from +.BR ioctl (2). + +Starting from Linux 4.11, the +.I features +field can be used to to ask whether particular features are supported +and explicitly enable userfaultfd features that are disabled by default. +The kernel always reports all the available features in the .I features field. +.\" FIXME add more details about feature negotiation and enablement + +Since Linux 4.11, the following feature bits may be set: +.TP +.B UFFD_FEATURE_EVENT_FORK +.TP +.B UFFD_FEATURE_EVENT_REMAP +.TP +.B UFFD_FEATURE_EVENT_REMOVE +.TP +.B UFFD_FEATURE_EVENT_UNMAP +.TP +.B UFFD_FEATURE_MISSING_HUGETLBFS +.TP +.B UFFD_FEATURE_MISSING_SHMEM +.\" FIXME add feature description + The returned .I ioctls field can contain the following bits: -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html