From: Jason Gunthorpe <jgg@nvidia.com>
To: Alistair Popple <apopple@nvidia.com>
Cc: akpm@linux-foundation.org, jglisse@redhat.com,
jhubbard@nvidia.com, ziy@nvidia.com, rcampbell@nvidia.com,
Felix.Kuehling@amd.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/hmm.c: Allow VM_MIXEDMAP to work with hmm_range_fault
Date: Fri, 5 Nov 2021 09:25:57 -0300 [thread overview]
Message-ID: <20211105122557.GA2744544@nvidia.com> (raw)
In-Reply-To: <20211104012001.2555676-1-apopple@nvidia.com>
On Thu, Nov 04, 2021 at 12:20:01PM +1100, Alistair Popple wrote:
> hmm_range_fault() can be used instead of get_user_pages() for devices
> which allow faulting however unlike get_user_pages() it will return an
> error when used on a VM_MIXEDMAP range.
>
> To make hmm_range_fault() more closely match get_user_pages() remove
> this restriction. This requires dealing with the !ARCH_HAS_PTE_SPECIAL
> case in hmm_vma_handle_pte(). Rather than replicating the logic of
> vm_normal_page() call it directly and do a check for the zero pfn
> similar to what get_user_pages() currently does.
>
> Also add a test to hmm selftest to verify functionality.
Please add a fixes line
> Signed-off-by: Alistair Popple <apopple@nvidia.com>
> ---
> lib/test_hmm.c | 24 +++++++++++++++
> mm/hmm.c | 5 +--
> tools/testing/selftests/vm/hmm-tests.c | 42 ++++++++++++++++++++++++++
> 3 files changed, 69 insertions(+), 2 deletions(-)
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Jason
next prev parent reply other threads:[~2021-11-05 12:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 1:20 [PATCH] mm/hmm.c: Allow VM_MIXEDMAP to work with hmm_range_fault Alistair Popple
2021-11-05 12:25 ` Jason Gunthorpe [this message]
2021-11-08 7:58 ` Alistair Popple
2021-11-16 4:48 ` Andrew Morton
2021-11-16 7:15 ` Alistair Popple
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=20211105122557.GA2744544@nvidia.com \
--to=jgg@nvidia.com \
--cc=Felix.Kuehling@amd.com \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rcampbell@nvidia.com \
--cc=ziy@nvidia.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).