[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 01/10] userfault: update kernel header for U
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] [PATCH v10 01/10] userfault: update kernel header for UFFD_FEATURE_* |
Date: |
Wed, 20 Sep 2017 19:43:17 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
* Alexey Perevalov (address@hidden) wrote:
> This commit adds modification for UFFD_FEATURE_SIGBUS and
> UFFD_FEATURE_THREAD_ID.
>
> Signed-off-by: Alexey Perevalov <address@hidden>
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 / address@hidden / Manchester, UK
Message not available