sysfs-bus-vfio-mdev 4.5 KB

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