114 lines · plain
1What: /sys/.../<device>/mdev_supported_types/2Date: October 20163Contact: Kirti Wankhede <kwankhede@nvidia.com>4Description:5 This directory contains list of directories of currently6 supported mediated device types and their details for7 <device>. Supported type attributes are defined by the8 vendor driver who registers with Mediated device framework.9 Each supported type is a directory whose name is created10 by adding the device driver string as a prefix to the11 string provided by the vendor driver.12 13What: /sys/.../<device>/mdev_supported_types/<type-id>/14Date: October 201615Contact: Kirti Wankhede <kwankhede@nvidia.com>16Description:17 This directory gives details of supported type, like name,18 description, available_instances, device_api etc.19 'device_api' and 'available_instances' are mandatory20 attributes to be provided by vendor driver. 'name',21 'description' and other vendor driver specific attributes22 are optional.23 24What: /sys/.../mdev_supported_types/<type-id>/create25Date: October 201626Contact: Kirti Wankhede <kwankhede@nvidia.com>27Description:28 Writing UUID to this file will create mediated device of29 type <type-id> for parent device <device>. This is a30 write-only file.31 For example::32 33 # echo "83b8f4f2-509f-382f-3c1e-e6bfe0fa1001" > \34 /sys/devices/foo/mdev_supported_types/foo-1/create35 36What: /sys/.../mdev_supported_types/<type-id>/devices/37Date: October 201638Contact: Kirti Wankhede <kwankhede@nvidia.com>39Description:40 This directory contains symbolic links pointing to mdev41 devices sysfs entries which are created of this <type-id>.42 43What: /sys/.../mdev_supported_types/<type-id>/available_instances44Date: October 201645Contact: Kirti Wankhede <kwankhede@nvidia.com>46Description:47 Reading this attribute will show the number of mediated48 devices of type <type-id> that can be created. This is a49 readonly file.50Users:51 Userspace applications interested in creating mediated52 device of that type. Userspace application should check53 the number of available instances could be created before54 creating mediated device of this type.55 56What: /sys/.../mdev_supported_types/<type-id>/device_api57Date: October 201658Contact: Kirti Wankhede <kwankhede@nvidia.com>59Description:60 Reading this attribute will show VFIO device API supported61 by this type. For example, "vfio-pci" for a PCI device,62 "vfio-platform" for platform device.63 64What: /sys/.../mdev_supported_types/<type-id>/name65Date: October 201666Contact: Kirti Wankhede <kwankhede@nvidia.com>67Description:68 Reading this attribute will show human readable name of the69 mediated device that will get created of type <type-id>.70 This is optional attribute. For example: "Grid M60-0Q"71Users:72 Userspace applications interested in knowing the name of73 a particular <type-id> that can help in understanding the74 type of mediated device.75 76What: /sys/.../mdev_supported_types/<type-id>/description77Date: October 201678Contact: Kirti Wankhede <kwankhede@nvidia.com>79Description:80 Reading this attribute will show description of the type of81 mediated device that will get created of type <type-id>.82 This is optional attribute. For example:83 "2 heads, 512M FB, 2560x1600 maximum resolution"84Users:85 Userspace applications interested in knowing the details of86 a particular <type-id> that can help in understanding the87 features provided by that type of mediated device.88 89What: /sys/.../<device>/<UUID>/90Date: October 201691Contact: Kirti Wankhede <kwankhede@nvidia.com>92Description:93 This directory represents device directory of mediated94 device. It contains all the attributes related to mediated95 device.96 97What: /sys/.../<device>/<UUID>/mdev_type98Date: October 201699Contact: Kirti Wankhede <kwankhede@nvidia.com>100Description:101 This is symbolic link pointing to supported type, <type-id>102 directory of which this mediated device is created.103 104What: /sys/.../<device>/<UUID>/remove105Date: October 2016106Contact: Kirti Wankhede <kwankhede@nvidia.com>107Description:108 Writing '1' to this file destroys the mediated device. The109 vendor driver can fail the remove() callback if that device110 is active and the vendor driver doesn't support hot unplug.111 Example::112 113 # echo 1 > /sys/bus/mdev/devices/<UUID>/remove114