Re: [PATCH v2 1/2] rust: pci: skip probing VFs if driver doesn't support VFs

From: Jason Gunthorpe
Date: Thu Oct 02 2025 - 08:11:32 EST


On Wed, Oct 01, 2025 at 07:00:09PM -0700, John Hubbard wrote:
> Add a "supports_vf" flag to struct pci_driver to let drivers declare
> Virtual Function (VF) support. If a driver does not support VFs, then
> the PCI driver core will not probe() any VFs for that driver's devices.
>
> On the Rust side, add a const "SUPPORTS_VF" Driver trait, defaulting to
> false: drivers must explicitly opt into VF support.

As I said in the other thread - please no.

Linux drivers are expected to run on their VFs. This temporary
weirdness of novacore should not be elevated to a core behavior that
people will misuse.

Jason