Re: [PATCH 2/3] vfio-pci: Fault mmaps to enable vma tracking

2020-05-04 Thread Alex Williamson
On Mon, 4 May 2020 12:05:56 -0300 Jason Gunthorpe wrote: > On Mon, May 04, 2020 at 08:20:55AM -0600, Alex Williamson wrote: > > On Fri, 1 May 2020 20:25:50 -0300 > > Jason Gunthorpe wrote: > > > > > On Fri, May 01, 2020 at 03:39:19PM -0600, Alex Williamson wrote: > > > > Rather than

Re: [PATCH 2/3] vfio-pci: Fault mmaps to enable vma tracking

2020-05-04 Thread Jason Gunthorpe
On Mon, May 04, 2020 at 08:20:55AM -0600, Alex Williamson wrote: > On Fri, 1 May 2020 20:25:50 -0300 > Jason Gunthorpe wrote: > > > On Fri, May 01, 2020 at 03:39:19PM -0600, Alex Williamson wrote: > > > Rather than calling remap_pfn_range() when a region is mmap'd, setup > > > a vm_ops handler

Re: [PATCH 2/3] vfio-pci: Fault mmaps to enable vma tracking

2020-05-04 Thread Alex Williamson
On Fri, 1 May 2020 20:25:50 -0300 Jason Gunthorpe wrote: > On Fri, May 01, 2020 at 03:39:19PM -0600, Alex Williamson wrote: > > Rather than calling remap_pfn_range() when a region is mmap'd, setup > > a vm_ops handler to support dynamic faulting of the range on access. > > This allows us to

Re: [PATCH 2/3] vfio-pci: Fault mmaps to enable vma tracking

2020-05-01 Thread Jason Gunthorpe
On Fri, May 01, 2020 at 03:39:19PM -0600, Alex Williamson wrote: > Rather than calling remap_pfn_range() when a region is mmap'd, setup > a vm_ops handler to support dynamic faulting of the range on access. > This allows us to manage a list of vmas actively mapping the area that > we can later use

[PATCH 2/3] vfio-pci: Fault mmaps to enable vma tracking

2020-05-01 Thread Alex Williamson
Rather than calling remap_pfn_range() when a region is mmap'd, setup a vm_ops handler to support dynamic faulting of the range on access. This allows us to manage a list of vmas actively mapping the area that we can later use to invalidate those mappings. The open callback invalidates the vma