Re: [PATCH 0/2] rust: pci: expose is_virtfn() and reject VFs in nova-core
From: Joel Fernandes
Date: Wed Oct 01 2025 - 20:49:09 EST
> On Oct 1, 2025, at 7:56 PM, Danilo Krummrich <dakr@xxxxxxxxxx> wrote:
>
> On Thu Oct 2, 2025 at 1:51 AM CEST, John Hubbard wrote:
>> On 10/1/25 4:47 PM, Joel Fernandes wrote:
>>>> On Oct 1, 2025, at 7:00 PM, John Hubbard <jhubbard@xxxxxxxxxx> wrote:
>>>> On 10/1/25 3:52 PM, Danilo Krummrich wrote:
>>>>>> On Thu Oct 2, 2025 at 12:38 AM CEST, John Hubbard wrote:
>>>>>> On 10/1/25 6:52 AM, Zhi Wang wrote:
>>>>>>> On 1.10.2025 13.32, Danilo Krummrich wrote:
>>>>>>>> On Wed Oct 1, 2025 at 3:22 AM CEST, John Hubbard wrote:
>>>>>>>>> On 9/30/25 5:29 PM, Alistair Popple wrote:
>>>>>>>>>> On 2025-10-01 at 08:07 +1000, John Hubbard <jhubbard@xxxxxxxxxx> wrote...
>>>>>> ...
>>> Here is my opinion and correct me if I missed something:
>>>
>>> It feels premature to remove the option of nova-core binding to a VF, since other options to disable auto probing do exist as Jason pointed out.
>>>
>>> Taking a parallel with VFIO pass through for instance, the user already has to do some diligence like preventing drivers from binding and then making vfio-pci bind to the device IDs. This case is similar though slightly different, but VFIO setup requires some configuration anyway so will it really improve anything?
>>>
>>> I quietly suggest holding on till there is a real need or we are sure nova cannot bind to, or operate on a VF. This
>>
>> I'm confident that nova-core cannot properly handle a VF with *today's* code.
>> There is no expectation at all for a VF to show up--yet.
>>
>> Which is why I think it's appropriate to skip it right now.
>
> I agree with John.
>
> If a driver does not support a certain device, it is not the user's
> responsibility to prevent probing. Currently nova-core does not support VFs, so
> it should never get probed for them in the first place.
That works for me. If we are doing this, I would also suggest adding a detailed comment preceding the if statement, saying the reason for this is because the VFs share the same device IDs when in reality we have 2 different drivers that handle the different functions.
Thanks.