> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > Sent: Friday, August 05, 2016 2:13 PM > > On 8/4/2016 12:51 PM, Tian, Kevin wrote: > >> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > >> Sent: Thursday, August 04, 2016 3:04 AM > >> > >> > >> 2. Physical device driver interface > >> This interface provides vendor driver the set APIs to manage physical > >> device related work in their own driver. APIs are : > >> - supported_config: provide supported configuration list by the vendor > >> driver > >> - create: to allocate basic resources in vendor driver for a mediated > >> device. > >> - destroy: to free resources in vendor driver when mediated device is > >> destroyed. > >> - reset: to free and reallocate resources in vendor driver during reboot > > > > Currently I saw 'reset' callback only invoked from VFIO ioctl path. Do > > you think whether it makes sense to expose a sysfs 'reset' node too, > > similar to what people see under a PCI device node? > > > > All vendor drivers might not support reset of mdev from sysfs. But those > who want to support can expose 'reset' node using 'mdev_attr_groups' of > 'struct parent_ops'. >
Yes, this way it works. Just wonder whether it makes sense to expose reset sysfs node by default if a reset callback is provided by vendor driver. :-) Thanks Kevin