linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.vnet.ibm.com>
To: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-man@vger.kernel.org,
	Mike Rapoport <rppt@linux.vnet.ibm.com>
Subject: [PATCH 3/5] ioctl_userfaultfd.2: update UFFDIO_API description
Date: Tue, 25 Apr 2017 19:29:06 +0300	[thread overview]
Message-ID: <1493137748-32452-4-git-send-email-rppt@linux.vnet.ibm.com> (raw)
In-Reply-To: <1493137748-32452-1-git-send-email-rppt@linux.vnet.ibm.com>

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
---
 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, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2017-04-25 16:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25 16:29 [PATCH 0/5] {ioctl_}userfaultfd.2: initial updates for 4.11 Mike Rapoport
2017-04-25 16:29 ` [PATCH 1/5] userfaultfd.2: describe memory types that can be used from 4.11 Mike Rapoport
2017-04-26  6:52   ` Michael Kerrisk (man-pages)
2017-04-25 16:29 ` [PATCH 2/5] ioctl_userfaultfd.2: " Mike Rapoport
2017-04-26  6:52   ` Michael Kerrisk (man-pages)
2017-04-25 16:29 ` Mike Rapoport [this message]
2017-04-25 16:29 ` [PATCH 4/5] userfaultfd.2: add Linux container migration use-case to NOTES Mike Rapoport
2017-04-26  7:16   ` Michael Kerrisk (man-pages)
2017-04-25 16:29 ` [PATCH 5/5] usefaultfd.2: add brief description of "non-cooperative" mode Mike Rapoport
2017-04-26  7:18   ` Michael Kerrisk (man-pages)
2017-04-26  7:23 ` [PATCH 0/5] {ioctl_}userfaultfd.2: initial updates for 4.11 Michael Kerrisk (man-pages)
2017-04-26  7:43   ` Mike Rapoport
2017-04-26  8:43     ` Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1493137748-32452-4-git-send-email-rppt@linux.vnet.ibm.com \
    --to=rppt@linux.vnet.ibm.com \
    --cc=aarcange@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).