Re: [PATCH 8/9] vfio/pci: export nvlink2 support into vendor vfio_pci drivers

From: Alexey Kardashevskiy
Date: Wed Mar 10 2021 - 20:44:16 EST




On 11/03/2021 12:34, Jason Gunthorpe wrote:
On Thu, Mar 11, 2021 at 12:20:33PM +1100, Alexey Kardashevskiy wrote:

It is supposed to match exactly the same match table as the pci_driver
above. We *don't* want different behavior from what the standrd PCI
driver matcher will do.

This is not a standard PCI driver though

It is now, that is what this patch makes it into. This is why it now
has a struct pci_driver.

and the main vfio-pci won't have a
list to match ever.

?? vfio-pci uses driver_override or new_id to manage its match list


Exactly, no list to update.


IBM NPU PCI id is unlikely to change ever but NVIDIA keeps making
new devices which work in those P9 boxes, are you going to keep
adding those ids to nvlink2gpu_vfio_pci_table?

Certainly, as needed. PCI list updates is normal for the kernel.

btw can the id list have only vendor ids and not have device ids?

The PCI matcher is quite flexable, see the other patch from Max for
the igd


ah cool, do this for NVIDIA GPUs then please, I just discovered another P9 system sold with NVIDIA T4s which is not in your list.


But best practice is to be as narrow as possible as I hope this will
eventually impact module autoloading and other details.

The amount of device specific knowledge is too little to tie it up to device ids, it is a generic PCI driver with quirks. We do not have a separate drivers for the hardware which requires quirks.

And how do you hope this should impact autoloading?



--
Alexey