RE: RFC: (re-)binding the VFIO platform driver to a platform device
From: Yoder Stuart-B08248
Date: Thu Oct 10 2013 - 09:43:36 EST
> 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
èº{.nÇ+·®+%Ëlzwm
ébëæìr¸zX§»®w¥{ayºÊÚë,j¢f£¢·hàz¹®w¥¢¸¢·¦j:+v¨wèjØm¶ÿ¾«êçzZ+ùÝj"ú!¶iOæ¬z·vØ^¶m§ÿðÃnÆàþY&