> The other option for this is to having some sort of priority on the
> device probing with hotplugging.
> 
> That is you can could do the following:
> 
>  1) add the device vendor/model in vfio
>  2) unbind the BDF from the original driver.
>  3) hotplug happens - any new device that has the device vendor/model
> gets
>    owned by vfio instead of the original device.
>  4). bind the BDF to the vfio.
> 
> Granted that is a bit silly too - as the admin might want to have the new
> hotplugged device be owned by the native driver.
> 
> In which case, why not just switch out from using device vendor/model
> to just using BDF values?

Did you read option #3 in my proposal-- using bus/dev/func # is
one option proposed:

>    3.  "Driver initiated explicit bind" -- with this approach the
>        vfio driver would create a private 'bind' sysfs object
>        and the user would echo the requested device into it:
>  
>        echo 0001:03:00.0 > /sys/bus/pci/drivers/vfio-pci/vfio_bind
              ^^^^^^^^^^^^
              bus/dev/func
> 
>        In order to make that work, the driver would need to call
>        driver_probe_device() and thus we need this patch:
>        https://lkml.org/lkml/2014/2/8/175

But in order to do that the vfio driver needs to call 
driver_probe_device() which it can't right now without
the proposed 2 line patch...which Greg rejects.

Stuart
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to