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

2021-02-19 Thread Alex Williamson
On Thu, 18 Feb 2021 19:04:04 -0400 Jason Gunthorpe wrote: > 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

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

2021-02-18 Thread Jason Gunthorpe
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

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

2021-02-18 Thread Alex Williamson
On Wed, 17 Feb 2021 21:12:09 -0400 Jason Gunthorpe wrote: > On Fri, Feb 12, 2021 at 05:20:57PM -0400, Jason Gunthorpe wrote: > > On Fri, Feb 12, 2021 at 12:27:39PM -0700, Alex Williamson wrote: > > > Create an interface through vfio-core where a vfio bus driver (ex. > > > vfio-pci) can

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

2021-02-17 Thread Jason Gunthorpe
On Fri, Feb 12, 2021 at 05:20:57PM -0400, Jason Gunthorpe wrote: > On Fri, Feb 12, 2021 at 12:27:39PM -0700, Alex Williamson wrote: > > Create an interface through vfio-core where a vfio bus driver (ex. > > vfio-pci) can register the vm_operations_struct it uses to map device > > memory, along

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

2021-02-12 Thread Jason Gunthorpe
On Fri, Feb 12, 2021 at 12:27:39PM -0700, Alex Williamson wrote: > Create an interface through vfio-core where a vfio bus driver (ex. > vfio-pci) can register the vm_operations_struct it uses to map device > memory, along with a set of registration callbacks. This allows > vfio-core to expose

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

2021-02-12 Thread Alex Williamson
Create an interface through vfio-core where a vfio bus driver (ex. vfio-pci) can register the vm_operations_struct it uses to map device memory, along with a set of registration callbacks. This allows vfio-core to expose interfaces for IOMMU backends to match a vm_area_struct to a bus driver and