All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Alexey Perevalov <a.perevalov@samsung.com>
Cc: qemu-devel@nongnu.org, i.maximets@samsung.com, peterx@redhat.com,
	eblake@redhat.com, quintela@redhat.com, heetae82.ahn@samsung.com
Subject: Re: [Qemu-devel] [PATCH v10 01/10] userfault: update kernel header for UFFD_FEATURE_*
Date: Wed, 20 Sep 2017 19:43:17 +0100	[thread overview]
Message-ID: <20170920184317.GK2449@work-vm> (raw)
In-Reply-To: <1505839684-10046-2-git-send-email-a.perevalov@samsung.com>

* Alexey Perevalov (a.perevalov@samsung.com) wrote:
> This commit adds modification for UFFD_FEATURE_SIGBUS and
> UFFD_FEATURE_THREAD_ID.
> 
> Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>

This should be replaced with just running the 
   scripts/update-linux-headers.sh
against a 4.14-rc1 checkout.

That can be done as a separate patch or the first patch
of this series.

Dave

> ---
>  linux-headers/linux/userfaultfd.h | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/linux-headers/linux/userfaultfd.h b/linux-headers/linux/userfaultfd.h
> index 9701772..b43cf0d 100644
> --- a/linux-headers/linux/userfaultfd.h
> +++ b/linux-headers/linux/userfaultfd.h
> @@ -23,7 +23,9 @@
>  			   UFFD_FEATURE_EVENT_REMOVE |	\
>  			   UFFD_FEATURE_EVENT_UNMAP |		\
>  			   UFFD_FEATURE_MISSING_HUGETLBFS |	\
> -			   UFFD_FEATURE_MISSING_SHMEM)
> +			   UFFD_FEATURE_MISSING_SHMEM |		\
> +			   UFFD_FEATURE_SIGBUS |		\
> +			   UFFD_FEATURE_THREAD_ID)
>  #define UFFD_API_IOCTLS				\
>  	((__u64)1 << _UFFDIO_REGISTER |		\
>  	 (__u64)1 << _UFFDIO_UNREGISTER |	\
> @@ -78,6 +80,9 @@ struct uffd_msg {
>  		struct {
>  			__u64	flags;
>  			__u64	address;
> +			union {
> +				__u32 ptid;
> +			} feat;
>  		} pagefault;
>  
>  		struct {
> @@ -153,6 +158,13 @@ struct uffdio_api {
>  	 * UFFD_FEATURE_MISSING_SHMEM works the same as
>  	 * UFFD_FEATURE_MISSING_HUGETLBFS, but it applies to shmem
>  	 * (i.e. tmpfs and other shmem based APIs).
> +	 *
> +	 * UFFD_FEATURE_SIGBUS feature means no page-fault
> +	 * (UFFD_EVENT_PAGEFAULT) event will be delivered, instead
> +	 * a SIGBUS signal will be sent to the faulting process.
> +	 *
> +	 * UFFD_FEATURE_THREAD_ID pid of the page faulted task_struct will
> +	 * be returned, if feature is not requested 0 will be returned.
>  	 */
>  #define UFFD_FEATURE_PAGEFAULT_FLAG_WP		(1<<0)
>  #define UFFD_FEATURE_EVENT_FORK			(1<<1)
> @@ -161,6 +173,8 @@ struct uffdio_api {
>  #define UFFD_FEATURE_MISSING_HUGETLBFS		(1<<4)
>  #define UFFD_FEATURE_MISSING_SHMEM		(1<<5)
>  #define UFFD_FEATURE_EVENT_UNMAP		(1<<6)
> +#define UFFD_FEATURE_SIGBUS			(1<<7)
> +#define UFFD_FEATURE_THREAD_ID			(1<<8)
>  	__u64 features;
>  
>  	__u64 ioctls;
> -- 
> 1.9.1
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2017-09-20 18:43 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170919164818eucas1p292f634ca79c4b7ed8e83d1529dd23c04@eucas1p2.samsung.com>
2017-09-19 16:47 ` [Qemu-devel] [PATCH v10 00/10] calculate blocktime for postcopy live migration Alexey Perevalov
2017-09-19 16:47   ` [Qemu-devel] [PATCH v10 01/10] userfault: update kernel header for UFFD_FEATURE_* Alexey Perevalov
2017-09-20 18:43     ` Dr. David Alan Gilbert [this message]
2017-09-21  7:33       ` Alexey Perevalov
2017-09-19 16:47   ` [Qemu-devel] [PATCH v10 02/10] migration: pass MigrationIncomingState* into migration check functions Alexey Perevalov
2017-09-20  9:01     ` Juan Quintela
2017-09-19 16:47   ` [Qemu-devel] [PATCH v10 03/10] migration: fix hardcoded function name in error report Alexey Perevalov
2017-09-19 16:47   ` [Qemu-devel] [PATCH v10 04/10] migration: split ufd_version_check onto receive/request features part Alexey Perevalov
2017-09-19 16:47   ` [Qemu-devel] [PATCH v10 05/10] migration: introduce postcopy-blocktime capability Alexey Perevalov
2017-09-19 16:48   ` [Qemu-devel] [PATCH v10 06/10] migration: add postcopy blocktime ctx into MigrationIncomingState Alexey Perevalov
2017-09-21 10:16     ` Dr. David Alan Gilbert
2017-09-21 11:27       ` Alexey Perevalov
2017-09-19 16:48   ` [Qemu-devel] [PATCH v10 07/10] migration: calculate vCPU blocktime on dst side Alexey Perevalov
2017-09-21 11:57     ` Dr. David Alan Gilbert
2017-09-22  8:47       ` Alexey Perevalov
2017-09-28  8:01       ` Alexey Perevalov
2017-09-19 16:48   ` [Qemu-devel] [PATCH v10 08/10] migration: postcopy_blocktime documentation Alexey Perevalov
2017-09-21 12:33     ` Dr. David Alan Gilbert
2017-09-21 13:26       ` Alexey Perevalov
2017-09-21 14:40         ` Dr. David Alan Gilbert
2017-09-19 16:48   ` [Qemu-devel] [PATCH v10 09/10] migration: add blocktime calculation into postcopy-test Alexey Perevalov
2017-09-21 12:39     ` Dr. David Alan Gilbert
2017-09-19 16:48   ` [Qemu-devel] [PATCH v10 10/10] migration: add postcopy total blocktime into query-migrate Alexey Perevalov
2017-09-19 17:41     ` Eric Blake
2017-09-21 12:42     ` Dr. David Alan Gilbert
2017-09-21 15:24       ` Alexey Perevalov
2017-09-21 16:44         ` Dr. David Alan Gilbert

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=20170920184317.GK2449@work-vm \
    --to=dgilbert@redhat.com \
    --cc=a.perevalov@samsung.com \
    --cc=eblake@redhat.com \
    --cc=heetae82.ahn@samsung.com \
    --cc=i.maximets@samsung.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.