ioctl_userfaultfd.2: Update UFFDIO_API description

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Mike Rapoport 2017-04-25 19:29:06 +03:00 committed by Michael Kerrisk
parent ba92d8b441
commit 30dced3378
1 changed files with 32 additions and 6 deletions

View File

@ -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: