lkml.org 
[lkml]   [2013]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: RFC: (re-)binding the VFIO platform driver to a platform device
Date
> I am trying to understand what you are proposing here (example "DEVICE"
> can be handled by "DRIVER1" and "VFIO-PLATFORM-DRIVER"):
> - By default drv->explicit_bind_only will be clear in all drivers.
> - By default device->explicit_bind_only will also be clear for all
> devices.
> - On boot, matching devices will bound to the respective driver (DEVICE
> >==> DRIVER1).
> This will never bound with VFIO-PLATFORM-DRIVER. So far same as
> before.
> - Via Sysfs interface set drv->explicit_bind_only for VFIO-PLATFORM-
> DRIVER.

No. VFIO-PLATFORM-DRIVER is _always_ explicit_bind_only and thus will be
statically set in the driver. See Kim's patch.

> - Then for the devices user want, set device->explicit_bind_only.
> - unbind DEVICE from DRIVER1
> - bind DEVICE with VFIO-PLATFORM-DRIVER. This time it will be successful
> because (device->explicit_bind_only && drv->explicit_bind_only) is set.
> - Now when done, unbind the DEVICE from VFIO-PLATFORM-DRIVER.
> - Now user can re-bind the device with either DRIVER1 or VFIO-PLATFORM-
> DRIVER.
> - Now once drv->explicit_bind_only is set in VFIO-PLATFORM-DRIVER, and a
> new device comes (device - hotplug) then can gets bound to matching drive
> and not with VFIO-PLATFORM-DRIVER.

Otherwise, it looks correct to me.

Stuart
\
 
 \ /
  Last update: 2013-10-10 16:01    [W:0.283 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site