13771bd96SKirti WankhedeWhat:           /sys/.../<device>/mdev_supported_types/
23771bd96SKirti WankhedeDate:           October 2016
33771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
43771bd96SKirti WankhedeDescription:
53771bd96SKirti Wankhede                This directory contains list of directories of currently
63771bd96SKirti Wankhede		supported mediated device types and their details for
73771bd96SKirti Wankhede		<device>. Supported type attributes are defined by the
83771bd96SKirti Wankhede		vendor driver who registers with Mediated device framework.
93771bd96SKirti Wankhede		Each supported type is a directory whose name is created
103771bd96SKirti Wankhede		by adding the device driver string as a prefix to the
113771bd96SKirti Wankhede		string provided by the vendor driver.
123771bd96SKirti Wankhede
133771bd96SKirti WankhedeWhat:           /sys/.../<device>/mdev_supported_types/<type-id>/
143771bd96SKirti WankhedeDate:           October 2016
153771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
163771bd96SKirti WankhedeDescription:
173771bd96SKirti Wankhede                This directory gives details of supported type, like name,
183771bd96SKirti Wankhede		description, available_instances, device_api etc.
193771bd96SKirti Wankhede		'device_api' and 'available_instances' are mandatory
203771bd96SKirti Wankhede		attributes to be provided by vendor driver. 'name',
213771bd96SKirti Wankhede		'description' and other vendor driver specific attributes
223771bd96SKirti Wankhede		are optional.
233771bd96SKirti Wankhede
243771bd96SKirti WankhedeWhat:           /sys/.../mdev_supported_types/<type-id>/create
253771bd96SKirti WankhedeDate:           October 2016
263771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
273771bd96SKirti WankhedeDescription:
283771bd96SKirti Wankhede		Writing UUID to this file will create mediated device of
293771bd96SKirti Wankhede		type <type-id> for parent device <device>. This is a
303771bd96SKirti Wankhede		write-only file.
313771bd96SKirti Wankhede		For example:
323771bd96SKirti Wankhede		# echo "83b8f4f2-509f-382f-3c1e-e6bfe0fa1001" >	\
333771bd96SKirti Wankhede		       /sys/devices/foo/mdev_supported_types/foo-1/create
343771bd96SKirti Wankhede
353771bd96SKirti WankhedeWhat:           /sys/.../mdev_supported_types/<type-id>/devices/
363771bd96SKirti WankhedeDate:           October 2016
373771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
383771bd96SKirti WankhedeDescription:
393771bd96SKirti Wankhede		This directory contains symbolic links pointing to mdev
403771bd96SKirti Wankhede		devices sysfs entries which are created of this <type-id>.
413771bd96SKirti Wankhede
423771bd96SKirti WankhedeWhat:           /sys/.../mdev_supported_types/<type-id>/available_instances
433771bd96SKirti WankhedeDate:           October 2016
443771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
453771bd96SKirti WankhedeDescription:
463771bd96SKirti Wankhede		Reading this attribute will show the number of mediated
473771bd96SKirti Wankhede		devices of type <type-id> that can be created. This is a
483771bd96SKirti Wankhede		readonly file.
493771bd96SKirti WankhedeUsers:
503771bd96SKirti Wankhede		Userspace applications interested in creating mediated
513771bd96SKirti Wankhede		device of that type. Userspace application should check
523771bd96SKirti Wankhede		the number of available instances could be created before
533771bd96SKirti Wankhede		creating mediated device of this type.
543771bd96SKirti Wankhede
553771bd96SKirti WankhedeWhat:           /sys/.../mdev_supported_types/<type-id>/device_api
563771bd96SKirti WankhedeDate:           October 2016
573771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
583771bd96SKirti WankhedeDescription:
593771bd96SKirti Wankhede		Reading this attribute will show VFIO device API supported
603771bd96SKirti Wankhede		by this type. For example, "vfio-pci" for a PCI device,
613771bd96SKirti Wankhede		"vfio-platform" for platform device.
623771bd96SKirti Wankhede
633771bd96SKirti WankhedeWhat:           /sys/.../mdev_supported_types/<type-id>/name
643771bd96SKirti WankhedeDate:           October 2016
653771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
663771bd96SKirti WankhedeDescription:
673771bd96SKirti Wankhede		Reading this attribute will show human readable name of the
683771bd96SKirti Wankhede		mediated device that will get created of type <type-id>.
693771bd96SKirti Wankhede		This is optional attribute. For example: "Grid M60-0Q"
703771bd96SKirti WankhedeUsers:
713771bd96SKirti Wankhede		Userspace applications interested in knowing the name of
723771bd96SKirti Wankhede		a particular <type-id> that can help in understanding the
733771bd96SKirti Wankhede		type of mediated device.
743771bd96SKirti Wankhede
753771bd96SKirti WankhedeWhat:           /sys/.../mdev_supported_types/<type-id>/description
763771bd96SKirti WankhedeDate:           October 2016
773771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
783771bd96SKirti WankhedeDescription:
793771bd96SKirti Wankhede		Reading this attribute will show description of the type of
803771bd96SKirti Wankhede		mediated device that will get created of type <type-id>.
813771bd96SKirti Wankhede		This is optional attribute. For example:
823771bd96SKirti Wankhede		"2 heads, 512M FB, 2560x1600 maximum resolution"
833771bd96SKirti WankhedeUsers:
843771bd96SKirti Wankhede		Userspace applications interested in knowing the details of
853771bd96SKirti Wankhede		a particular <type-id> that can help in understanding the
863771bd96SKirti Wankhede		features provided by that type of mediated device.
873771bd96SKirti Wankhede
883771bd96SKirti WankhedeWhat:           /sys/.../<device>/<UUID>/
893771bd96SKirti WankhedeDate:           October 2016
903771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
913771bd96SKirti WankhedeDescription:
923771bd96SKirti Wankhede		This directory represents device directory of mediated
933771bd96SKirti Wankhede		device. It contains all the attributes related to mediated
943771bd96SKirti Wankhede		device.
953771bd96SKirti Wankhede
963771bd96SKirti WankhedeWhat:           /sys/.../<device>/<UUID>/mdev_type
973771bd96SKirti WankhedeDate:           October 2016
983771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
993771bd96SKirti WankhedeDescription:
1003771bd96SKirti Wankhede		This is symbolic link pointing to supported type, <type-id>
1013771bd96SKirti Wankhede		directory of which this mediated device is created.
1023771bd96SKirti Wankhede
1033771bd96SKirti WankhedeWhat:           /sys/.../<device>/<UUID>/remove
1043771bd96SKirti WankhedeDate:           October 2016
1053771bd96SKirti WankhedeContact:        Kirti Wankhede <kwankhede@nvidia.com>
1063771bd96SKirti WankhedeDescription:
1073771bd96SKirti Wankhede		Writing '1' to this file destroys the mediated device. The
1083771bd96SKirti Wankhede		vendor driver can fail the remove() callback if that device
1093771bd96SKirti Wankhede		is active and the vendor driver doesn't support hot unplug.
1103771bd96SKirti Wankhede		Example:
1113771bd96SKirti Wankhede		# echo 1 > /sys/bus/mdev/devices/<UUID>/remove
112