sysfs-kernel-iommu_groups 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. What: /sys/kernel/iommu_groups/
  2. Date: May 2012
  3. KernelVersion: v3.5
  4. Contact: Alex Williamson <[email protected]>
  5. Description: /sys/kernel/iommu_groups/ contains a number of sub-
  6. directories, each representing an IOMMU group. The
  7. name of the sub-directory matches the iommu_group_id()
  8. for the group, which is an integer value. Within each
  9. subdirectory is another directory named "devices" with
  10. links to the sysfs devices contained in this group.
  11. The group directory also optionally contains a "name"
  12. file if the IOMMU driver has chosen to register a more
  13. common name for the group.
  14. Users:
  15. What: /sys/kernel/iommu_groups/reserved_regions
  16. Date: January 2017
  17. KernelVersion: v4.11
  18. Contact: Eric Auger <[email protected]>
  19. Description: /sys/kernel/iommu_groups/reserved_regions list IOVA
  20. regions that are reserved. Not necessarily all
  21. reserved regions are listed. This is typically used to
  22. output direct-mapped, MSI, non mappable regions. Each
  23. region is described on a single line: the 1st field is
  24. the base IOVA, the second is the end IOVA and the third
  25. field describes the type of the region.
  26. Since kernel 5.3, in case an RMRR is used only by graphics or
  27. USB devices it is now exposed as "direct-relaxable" instead
  28. of "direct". In device assignment use case, for instance,
  29. those RMRR are considered to be relaxable and safe.
  30. What: /sys/kernel/iommu_groups/<grp_id>/type
  31. Date: November 2020
  32. KernelVersion: v5.11
  33. Contact: Sai Praneeth Prakhya <[email protected]>
  34. Description: /sys/kernel/iommu_groups/<grp_id>/type shows the type of default
  35. domain in use by iommu for this group. See include/linux/iommu.h
  36. for possible read values. A privileged user could request kernel to
  37. change the group type by writing to this file. Valid write values:
  38. ======== ======================================================
  39. DMA All the DMA transactions from the device in this group
  40. are translated by the iommu.
  41. DMA-FQ As above, but using batched invalidation to lazily
  42. remove translations after use. This may offer reduced
  43. overhead at the cost of reduced memory protection.
  44. identity All the DMA transactions from the device in this group
  45. are not translated by the iommu. Maximum performance
  46. but zero protection.
  47. auto Change to the type the device was booted with.
  48. ======== ======================================================
  49. The default domain type of a group may be modified only when
  50. - The group has only one device.
  51. - The device in the group is not bound to any device driver.
  52. So, the users must unbind the appropriate driver before
  53. changing the default domain type.
  54. Unbinding a device driver will take away the driver's control
  55. over the device and if done on devices that host root file
  56. system could lead to catastrophic effects (the users might
  57. need to reboot the machine to get it to normal state). So, it's
  58. expected that the users understand what they're doing.