Thread (11 messages) 11 messages, 3 authors, 2021-02-19

Re: [PATCH 1/3] vfio: Introduce vma ops registration and notifier

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2021-02-18 23:05:14
Also in: lkml

On Thu, Feb 18, 2021 at 02:56:06PM -0700, Alex Williamson wrote:
Looks pretty slick.  I won't claim it's fully gelled in my head yet,
but AIUI you're creating these inodes on your new pseudo fs and
associating it via the actual user fd via the f_mapping pointer, which
allows multiple fds to associate and address space back to this inode
when you want to call unmap_mapping_range().  
Yes, from what I can tell all the fs/inode stuff is just mandatory
overhead to get a unique address_space pointer, as that is the only
thing this is actually using.

I have to check the mmap flow more carefully, I recall pointing to a
existing race here with Daniel, but the general idea should hold.
That clarifies from the previous email how we'd store the inode on
the vfio_device without introducing yet another tracking list for
device fds.
Right, you can tell from the vma what inode it is for, and the inode
can tell you if it is a VFIO VMA or not, so no tracking lists needed
at all.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help