From: Christoph Hellwig <hch@infradead.org>
To: Peter Xu <peterx@redhat.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
Alex Williamson <alex.williamson@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
prime.zeng@hisilicon.com, cohuck@redhat.com
Subject: Re: [PATCH] vfio/pci: Handle concurrent vma faults
Date: Thu, 11 Mar 2021 11:35:24 +0000 [thread overview]
Message-ID: <20210311113524.GA1726872@infradead.org> (raw)
In-Reply-To: <20210310200607.GG6530@xz-x1>
On Wed, Mar 10, 2021 at 03:06:07PM -0500, Peter Xu wrote:
> On Wed, Mar 10, 2021 at 02:40:11PM -0400, Jason Gunthorpe wrote:
> > On Wed, Mar 10, 2021 at 11:34:06AM -0700, Alex Williamson wrote:
> >
> > > > I think after the address_space changes this should try to stick with
> > > > a normal io_rmap_pfn_range() done outside the fault handler.
> > >
> > > I assume you're suggesting calling io_remap_pfn_range() when device
> > > memory is enabled,
> >
> > Yes, I think I saw Peter thinking along these lines too
> >
> > Then fault just always causes SIGBUS if it gets called
I feel much more comfortable having the io_remap_pfn_range in place.
>
> Indeed that looks better than looping in the fault().
>
> But I don't know whether it'll be easy to move io_remap_pfn_range() to device
> memory enablement. If it's a two-step thing, we can fix the BUG_ON and vma
> duplication issue first, then the full rework can be done in the bigger series
> as what be chosen as the last approach.
What kind of problems do you envision? It seems pretty simple to do,
at least when combined with the unmap_mapping_range patch.
next prev parent reply other threads:[~2021-03-11 11:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 17:53 [PATCH] vfio/pci: Handle concurrent vma faults Alex Williamson
2021-03-10 18:14 ` Jason Gunthorpe
2021-03-10 18:34 ` Alex Williamson
2021-03-10 18:40 ` Jason Gunthorpe
2021-03-10 20:06 ` Peter Xu
2021-03-11 11:35 ` Christoph Hellwig [this message]
2021-03-11 16:35 ` Peter Xu
2021-03-12 19:16 ` Alex Williamson
2021-03-12 19:41 ` Jason Gunthorpe
2021-03-12 20:09 ` Alex Williamson
2021-03-12 20:58 ` Alex Williamson
2021-03-13 0:03 ` Jason Gunthorpe
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=20210311113524.GA1726872@infradead.org \
--to=hch@infradead.org \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=jgg@nvidia.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterx@redhat.com \
--cc=prime.zeng@hisilicon.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).