Re: [PATCH V1 vfio 0/9] Introduce a vfio driver over virtio devices

Alex Williamson
2023-10-23T16:46:49Z

On Mon, 23 Oct 2023 13:20:43 -0300
Jason Gunthorpe <jgg@nvidia.com> wrote:

> On Mon, Oct 23, 2023 at 10:09:13AM -0600, Alex Williamson wrote:
> > On Mon, 23 Oct 2023 12:42:57 -0300
> > Jason Gunthorpe <jgg@nvidia.com> wrote:
> >
> > > On Mon, Oct 23, 2023 at 09:33:23AM -0600, Alex Williamson wrote:
> > >
> > > > > Alex,
> > > > > Are you fine to leave the provisioning of the VF including the control
> > > > > of its transitional capability in the device hands as was suggested by
> > > > > Jason ?
> > > >
> > > > If this is the standard we're going to follow, ie. profiling of a
> > > > device is expected to occur prior to the probe of the vfio-pci variant
> > > > driver, then we should get the out-of-tree NVIDIA vGPU driver on board
> > > > with this too.
> > >
> > > Those GPU drivers are using mdev not vfio-pci..
> >
> > The SR-IOV mdev vGPUs rely on the IOMMU backing device support which
> > was removed from upstream.
>
> It wasn't, but it changed forms.
>
> mdev is a sysfs framework for managing lifecycle with GUIDs only.
>
> The thing using mdev can call vfio_register_emulated_iommu_dev() or
> vfio_register_group_dev().
>
> It doesn't matter to the mdev stuff.
>
> The thing using mdev is responsible to get the struct device to pass
> to vfio_register_group_dev()

Are we describing what can be done (possibly limited to out-of-tree
drivers) or what should be done and would be accepted upstream?

I'm under the impression that mdev has been redefined to be more
narrowly focused for emulated IOMMU devices and that devices based
around a PCI VF should be making use of a vfio-pci variant driver.

Are you suggesting it's the vendor's choice based on whether they want
the mdev lifecycle support?

We've defined certain aspects of the vfio-mdev interface as only
available for emulated IOMMU devices, ex. page pinning. Thanks,

Alex