Re: [PATCH] don't allow vfio drivers to bind on driver_attach

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2016-01-12 at 22:25 +0000, Keller, Jacob E wrote:
> On Tue, 2016-01-12 at 15:06 -0700, Alex Williamson wrote:
> > We already have a solution in the kernel for this, it's the
> > driver_override interface.  Rather than your above example of
> > adding
> > a
> > new ID to the dynamic list for the driver, such that it will
> > automatically probe the device, we reverse the process to allow the
> > device to match the driver.  The sequence becomes:
> > 
> > echo vfio-pci > /sys/bus/pci/devices/<pci address>/driver_override
> > echo <pci address> > /sys/bus/pci/drivers/<old driver>/unbind
> > echo <pci address> /sys/bus/pci/drivers_probe
> > 
> > The old interface is kept around because there are quite a few
> > users
> > of
> > it, some of which would be broken by the proposed manual_bind_only
> > code
> > change, including the example of using driver_override above.  This
> > also avoids even the need for pci-stub (which has the same issue),
> > since we can simply put a dummy name in driver_override to avoid a
> > device from matching any driver.  Thanks,
> > 
> > Alex
> 
> 
> Hmm, that makes sense. So really I should see about getting the tools
> which currently use the old interface to use a new one?
> 
> (Don't we still want/need vfio-pci for other reasons besides just being
> a stub driver?)

Of course, vfio-pci is much more than a stub driver, I was only noting
pci-stub as another meta driver that only uses dynamic adds.  It's more
of a side comment that the functionality that pci-stub provides is mostly unnecessary with driver_override.  Thanks,
Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux