From: Jason Gunthorpe <jgg@ziepe.ca>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
cohuck@redhat.com, peterx@redhat.com
Subject: Re: [PATCH 3/3] vfio-pci: Invalidate mmaps and block MMIO access on disabled memory
Date: Tue, 5 May 2020 15:36:29 -0300 [thread overview]
Message-ID: <20200505183629.GF26002@ziepe.ca> (raw)
In-Reply-To: <20200505111227.02ac9cee@w520.home>
On Tue, May 05, 2020 at 11:12:27AM -0600, Alex Williamson wrote:
>
> As noted in the comment, the fault handler can simply do:
>
> mutex_lock(&vdev->vma_lock);
> down_read(&vdev->memory_lock);
>
> This should be deadlock free now, so we can drop the retry handling
That does look like the right direction, because the memory_lock can
be done at the very end it means it doesn't need to be nested inside
mmap_sem
This is much cleaner!
Jason
prev parent reply other threads:[~2020-05-05 18:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 21:38 [PATCH 0/3] vfio-pci: Block user access to disabled device MMIO Alex Williamson
2020-05-01 21:39 ` [PATCH 1/3] vfio/type1: Support faulting PFNMAP vmas Alex Williamson
2020-05-01 23:50 ` Jason Gunthorpe
2020-05-04 14:06 ` Alex Williamson
2020-05-04 15:02 ` Jason Gunthorpe
2020-05-01 21:39 ` [PATCH 2/3] vfio-pci: Fault mmaps to enable vma tracking Alex Williamson
2020-05-01 23:25 ` Jason Gunthorpe
2020-05-04 14:20 ` Alex Williamson
2020-05-04 15:05 ` Jason Gunthorpe
2020-05-04 15:53 ` Alex Williamson
2020-05-01 21:39 ` [PATCH 3/3] vfio-pci: Invalidate mmaps and block MMIO access on disabled memory Alex Williamson
2020-05-01 23:48 ` Jason Gunthorpe
2020-05-04 18:26 ` Alex Williamson
2020-05-04 18:44 ` Jason Gunthorpe
2020-05-04 19:35 ` Alex Williamson
2020-05-04 20:01 ` Jason Gunthorpe
2020-05-05 17:12 ` Alex Williamson
2020-05-05 18:36 ` Jason Gunthorpe [this message]
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=20200505183629.GF26002@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=alex.williamson@redhat.com \
--cc=cohuck@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox