Re: [RFC PATCH] s390: vfio-ap: Register the vfio_ap module for the "ap" parent bus

From: Halil Pasic
Date: Thu Dec 16 2021 - 06:26:07 EST


On Thu, 16 Dec 2021 11:39:13 +0100
Cornelia Huck <cohuck@xxxxxxxxxx> wrote:

> > Also what does vfio-pci do? As far as I can tell vfio-pci does not
> > participate in module auto loading just because there are pci devices.
> > The have some smart override I don't quite understand:
> > https://patchwork.ozlabs.org/project/linux-pci/patch/20210826103912.128972-11-yishaih@xxxxxxxxxx/
> > Before, I don't think they had a MODULE_DEVICE_TABLE:
> > https://elixir.bootlin.com/linux/v5.8.18/source/drivers/vfio/pci/vfio_pci.c
>
> I don't think it makes sense to look at pci for inspiration here; they
> have a myriad of different device types, while ap only has a few (and
> probably not that many different ones on a given system), and css only
> has one that really matters.

I really don't understand how they having a myraid of different device
types is relevant here. Are they not taking care of that by using
PCI_ANY_ID anyway? Can you please explain?

Please have another look at the commit message of
cc6711b0bf36 ("PCI / VFIO: Add 'override_only' support for VFIO PCI sub system").
They generate alias(es) that catch every PCI device (via PCI_ANY_ID), but
in a way that precludes auto-loading and enables a generic 'override'
algorithm.

Regards,
Halil