1*4882a593SmuzhiyunWhat: /sys/.../<device>/mdev_supported_types/ 2*4882a593SmuzhiyunDate: October 2016 3*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 4*4882a593SmuzhiyunDescription: 5*4882a593Smuzhiyun This directory contains list of directories of currently 6*4882a593Smuzhiyun supported mediated device types and their details for 7*4882a593Smuzhiyun <device>. Supported type attributes are defined by the 8*4882a593Smuzhiyun vendor driver who registers with Mediated device framework. 9*4882a593Smuzhiyun Each supported type is a directory whose name is created 10*4882a593Smuzhiyun by adding the device driver string as a prefix to the 11*4882a593Smuzhiyun string provided by the vendor driver. 12*4882a593Smuzhiyun 13*4882a593SmuzhiyunWhat: /sys/.../<device>/mdev_supported_types/<type-id>/ 14*4882a593SmuzhiyunDate: October 2016 15*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 16*4882a593SmuzhiyunDescription: 17*4882a593Smuzhiyun This directory gives details of supported type, like name, 18*4882a593Smuzhiyun description, available_instances, device_api etc. 19*4882a593Smuzhiyun 'device_api' and 'available_instances' are mandatory 20*4882a593Smuzhiyun attributes to be provided by vendor driver. 'name', 21*4882a593Smuzhiyun 'description' and other vendor driver specific attributes 22*4882a593Smuzhiyun are optional. 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunWhat: /sys/.../mdev_supported_types/<type-id>/create 25*4882a593SmuzhiyunDate: October 2016 26*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 27*4882a593SmuzhiyunDescription: 28*4882a593Smuzhiyun Writing UUID to this file will create mediated device of 29*4882a593Smuzhiyun type <type-id> for parent device <device>. This is a 30*4882a593Smuzhiyun write-only file. 31*4882a593Smuzhiyun For example:: 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun # echo "83b8f4f2-509f-382f-3c1e-e6bfe0fa1001" > \ 34*4882a593Smuzhiyun /sys/devices/foo/mdev_supported_types/foo-1/create 35*4882a593Smuzhiyun 36*4882a593SmuzhiyunWhat: /sys/.../mdev_supported_types/<type-id>/devices/ 37*4882a593SmuzhiyunDate: October 2016 38*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 39*4882a593SmuzhiyunDescription: 40*4882a593Smuzhiyun This directory contains symbolic links pointing to mdev 41*4882a593Smuzhiyun devices sysfs entries which are created of this <type-id>. 42*4882a593Smuzhiyun 43*4882a593SmuzhiyunWhat: /sys/.../mdev_supported_types/<type-id>/available_instances 44*4882a593SmuzhiyunDate: October 2016 45*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 46*4882a593SmuzhiyunDescription: 47*4882a593Smuzhiyun Reading this attribute will show the number of mediated 48*4882a593Smuzhiyun devices of type <type-id> that can be created. This is a 49*4882a593Smuzhiyun readonly file. 50*4882a593SmuzhiyunUsers: 51*4882a593Smuzhiyun Userspace applications interested in creating mediated 52*4882a593Smuzhiyun device of that type. Userspace application should check 53*4882a593Smuzhiyun the number of available instances could be created before 54*4882a593Smuzhiyun creating mediated device of this type. 55*4882a593Smuzhiyun 56*4882a593SmuzhiyunWhat: /sys/.../mdev_supported_types/<type-id>/device_api 57*4882a593SmuzhiyunDate: October 2016 58*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 59*4882a593SmuzhiyunDescription: 60*4882a593Smuzhiyun Reading this attribute will show VFIO device API supported 61*4882a593Smuzhiyun by this type. For example, "vfio-pci" for a PCI device, 62*4882a593Smuzhiyun "vfio-platform" for platform device. 63*4882a593Smuzhiyun 64*4882a593SmuzhiyunWhat: /sys/.../mdev_supported_types/<type-id>/name 65*4882a593SmuzhiyunDate: October 2016 66*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 67*4882a593SmuzhiyunDescription: 68*4882a593Smuzhiyun Reading this attribute will show human readable name of the 69*4882a593Smuzhiyun mediated device that will get created of type <type-id>. 70*4882a593Smuzhiyun This is optional attribute. For example: "Grid M60-0Q" 71*4882a593SmuzhiyunUsers: 72*4882a593Smuzhiyun Userspace applications interested in knowing the name of 73*4882a593Smuzhiyun a particular <type-id> that can help in understanding the 74*4882a593Smuzhiyun type of mediated device. 75*4882a593Smuzhiyun 76*4882a593SmuzhiyunWhat: /sys/.../mdev_supported_types/<type-id>/description 77*4882a593SmuzhiyunDate: October 2016 78*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 79*4882a593SmuzhiyunDescription: 80*4882a593Smuzhiyun Reading this attribute will show description of the type of 81*4882a593Smuzhiyun mediated device that will get created of type <type-id>. 82*4882a593Smuzhiyun This is optional attribute. For example: 83*4882a593Smuzhiyun "2 heads, 512M FB, 2560x1600 maximum resolution" 84*4882a593SmuzhiyunUsers: 85*4882a593Smuzhiyun Userspace applications interested in knowing the details of 86*4882a593Smuzhiyun a particular <type-id> that can help in understanding the 87*4882a593Smuzhiyun features provided by that type of mediated device. 88*4882a593Smuzhiyun 89*4882a593SmuzhiyunWhat: /sys/.../<device>/<UUID>/ 90*4882a593SmuzhiyunDate: October 2016 91*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 92*4882a593SmuzhiyunDescription: 93*4882a593Smuzhiyun This directory represents device directory of mediated 94*4882a593Smuzhiyun device. It contains all the attributes related to mediated 95*4882a593Smuzhiyun device. 96*4882a593Smuzhiyun 97*4882a593SmuzhiyunWhat: /sys/.../<device>/<UUID>/mdev_type 98*4882a593SmuzhiyunDate: October 2016 99*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 100*4882a593SmuzhiyunDescription: 101*4882a593Smuzhiyun This is symbolic link pointing to supported type, <type-id> 102*4882a593Smuzhiyun directory of which this mediated device is created. 103*4882a593Smuzhiyun 104*4882a593SmuzhiyunWhat: /sys/.../<device>/<UUID>/remove 105*4882a593SmuzhiyunDate: October 2016 106*4882a593SmuzhiyunContact: Kirti Wankhede <kwankhede@nvidia.com> 107*4882a593SmuzhiyunDescription: 108*4882a593Smuzhiyun Writing '1' to this file destroys the mediated device. The 109*4882a593Smuzhiyun vendor driver can fail the remove() callback if that device 110*4882a593Smuzhiyun is active and the vendor driver doesn't support hot unplug. 111*4882a593Smuzhiyun Example:: 112*4882a593Smuzhiyun 113*4882a593Smuzhiyun # echo 1 > /sys/bus/mdev/devices/<UUID>/remove 114