1 What: /sys/.../<device>/mdev_supported_types/
3 Contact: Kirti Wankhede <kwankhede@nvidia.com>
5 This directory contains list of directories of currently
6 supported mediated device types and their details for
7 <device>. Supported type attributes are defined by the
8 vendor driver who registers with Mediated device framework.
9 Each supported type is a directory whose name is created
10 by adding the device driver string as a prefix to the
11 string provided by the vendor driver.
13 What: /sys/.../<device>/mdev_supported_types/<type-id>/
15 Contact: Kirti Wankhede <kwankhede@nvidia.com>
17 This directory gives details of supported type, like name,
18 description, available_instances, device_api etc.
19 'device_api' and 'available_instances' are mandatory
20 attributes to be provided by vendor driver. 'name',
21 'description' and other vendor driver specific attributes
24 What: /sys/.../mdev_supported_types/<type-id>/create
26 Contact: Kirti Wankhede <kwankhede@nvidia.com>
28 Writing UUID to this file will create mediated device of
29 type <type-id> for parent device <device>. This is a
33 # echo "83b8f4f2-509f-382f-3c1e-e6bfe0fa1001" > \
34 /sys/devices/foo/mdev_supported_types/foo-1/create
36 What: /sys/.../mdev_supported_types/<type-id>/devices/
38 Contact: Kirti Wankhede <kwankhede@nvidia.com>
40 This directory contains symbolic links pointing to mdev
41 devices sysfs entries which are created of this <type-id>.
43 What: /sys/.../mdev_supported_types/<type-id>/available_instances
45 Contact: Kirti Wankhede <kwankhede@nvidia.com>
47 Reading this attribute will show the number of mediated
48 devices of type <type-id> that can be created. This is a
51 Userspace applications interested in creating mediated
52 device of that type. Userspace application should check
53 the number of available instances could be created before
54 creating mediated device of this type.
56 What: /sys/.../mdev_supported_types/<type-id>/device_api
58 Contact: Kirti Wankhede <kwankhede@nvidia.com>
60 Reading this attribute will show VFIO device API supported
61 by this type. For example, "vfio-pci" for a PCI device,
62 "vfio-platform" for platform device.
64 What: /sys/.../mdev_supported_types/<type-id>/name
66 Contact: Kirti Wankhede <kwankhede@nvidia.com>
68 Reading this attribute will show human readable name of the
69 mediated device that will get created of type <type-id>.
70 This is optional attribute. For example: "Grid M60-0Q"
72 Userspace applications interested in knowing the name of
73 a particular <type-id> that can help in understanding the
74 type of mediated device.
76 What: /sys/.../mdev_supported_types/<type-id>/description
78 Contact: Kirti Wankhede <kwankhede@nvidia.com>
80 Reading this attribute will show description of the type of
81 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"
85 Userspace applications interested in knowing the details of
86 a particular <type-id> that can help in understanding the
87 features provided by that type of mediated device.
89 What: /sys/.../<device>/<UUID>/
91 Contact: Kirti Wankhede <kwankhede@nvidia.com>
93 This directory represents device directory of mediated
94 device. It contains all the attributes related to mediated
97 What: /sys/.../<device>/<UUID>/mdev_type
99 Contact: Kirti Wankhede <kwankhede@nvidia.com>
101 This is symbolic link pointing to supported type, <type-id>
102 directory of which this mediated device is created.
104 What: /sys/.../<device>/<UUID>/remove
106 Contact: Kirti Wankhede <kwankhede@nvidia.com>
108 Writing '1' to this file destroys the mediated device. The
109 vendor driver can fail the remove() callback if that device
110 is active and the vendor driver doesn't support hot unplug.
113 # echo 1 > /sys/bus/mdev/devices/<UUID>/remove