xref: /linux/Documentation/ABI/testing/sysfs-kernel-iommu_groups (revision 63a816749d8670e4a92da5aecfb91238821a3d97)
1d72e31c9SAlex WilliamsonWhat:		/sys/kernel/iommu_groups/
2d72e31c9SAlex WilliamsonDate:		May 2012
3d72e31c9SAlex WilliamsonKernelVersion:	v3.5
4d72e31c9SAlex WilliamsonContact:	Alex Williamson <alex.williamson@redhat.com>
5d72e31c9SAlex WilliamsonDescription:	/sys/kernel/iommu_groups/ contains a number of sub-
6d72e31c9SAlex Williamson		directories, each representing an IOMMU group.  The
7d72e31c9SAlex Williamson		name of the sub-directory matches the iommu_group_id()
8d72e31c9SAlex Williamson		for the group, which is an integer value.  Within each
9d72e31c9SAlex Williamson		subdirectory is another directory named "devices" with
10d72e31c9SAlex Williamson		links to the sysfs devices contained in this group.
11d72e31c9SAlex Williamson		The group directory also optionally contains a "name"
12d72e31c9SAlex Williamson		file if the IOMMU driver has chosen to register a more
13d72e31c9SAlex Williamson		common name for the group.
14d72e31c9SAlex WilliamsonUsers:
15bc7d12b9SEric Auger
16bc7d12b9SEric AugerWhat:		/sys/kernel/iommu_groups/reserved_regions
17bc7d12b9SEric AugerDate: 		January 2017
18bc7d12b9SEric AugerKernelVersion:  v4.11
19bc7d12b9SEric AugerContact: 	Eric Auger <eric.auger@redhat.com>
20bc7d12b9SEric AugerDescription:    /sys/kernel/iommu_groups/reserved_regions list IOVA
21bc7d12b9SEric Auger		regions that are reserved. Not necessarily all
22bc7d12b9SEric Auger		reserved regions are listed. This is typically used to
23bc7d12b9SEric Auger		output direct-mapped, MSI, non mappable regions. Each
24bc7d12b9SEric Auger		region is described on a single line: the 1st field is
25bc7d12b9SEric Auger		the base IOVA, the second is the end IOVA and the third
26bc7d12b9SEric Auger		field describes the type of the region.
27adfd3738SEric Auger
28adfd3738SEric AugerWhat:		/sys/kernel/iommu_groups/reserved_regions
29adfd3738SEric AugerDate: 		June 2019
30adfd3738SEric AugerKernelVersion:  v5.3
31adfd3738SEric AugerContact: 	Eric Auger <eric.auger@redhat.com>
32adfd3738SEric AugerDescription:    In case an RMRR is used only by graphics or USB devices
33adfd3738SEric Auger		it is now exposed as "direct-relaxable" instead of "direct".
34adfd3738SEric Auger		In device assignment use case, for instance, those RMRR
35adfd3738SEric Auger		are considered to be relaxable and safe.
36*63a81674SSai Praneeth Prakhya
37*63a81674SSai Praneeth PrakhyaWhat:		/sys/kernel/iommu_groups/<grp_id>/type
38*63a81674SSai Praneeth PrakhyaDate:		November 2020
39*63a81674SSai Praneeth PrakhyaKernelVersion:	v5.11
40*63a81674SSai Praneeth PrakhyaContact:	Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
41*63a81674SSai Praneeth PrakhyaDescription:	/sys/kernel/iommu_groups/<grp_id>/type shows the type of default
42*63a81674SSai Praneeth Prakhya		domain in use by iommu for this group. See include/linux/iommu.h
43*63a81674SSai Praneeth Prakhya		for possible values. A privileged user could request kernel to
44*63a81674SSai Praneeth Prakhya		change the group type by writing to this file. Presently, only
45*63a81674SSai Praneeth Prakhya		three types of request are supported:
46*63a81674SSai Praneeth Prakhya		1. DMA: All the DMA transactions from the device in this group
47*63a81674SSai Praneeth Prakhya			are translated by the iommu.
48*63a81674SSai Praneeth Prakhya		2. identity: All the DMA transactions from the device in this
49*63a81674SSai Praneeth Prakhya			     group are *not* translated by the iommu.
50*63a81674SSai Praneeth Prakhya		3. auto: Change to the type the device was booted with.
51*63a81674SSai Praneeth Prakhya		Note:
52*63a81674SSai Praneeth Prakhya		-----
53*63a81674SSai Praneeth Prakhya		The default domain type of a group may be modified only when
54*63a81674SSai Praneeth Prakhya		1. The group has *only* one device
55*63a81674SSai Praneeth Prakhya		2. The device in the group is not bound to any device driver.
56*63a81674SSai Praneeth Prakhya		   So, the users must unbind the appropriate driver before
57*63a81674SSai Praneeth Prakhya		   changing the default domain type.
58*63a81674SSai Praneeth Prakhya		Caution:
59*63a81674SSai Praneeth Prakhya		--------
60*63a81674SSai Praneeth Prakhya		Unbinding a device driver will take away the driver's control
61*63a81674SSai Praneeth Prakhya		over the device and if done on devices that host root file
62*63a81674SSai Praneeth Prakhya		system could lead to catastrophic effects (the users might
63*63a81674SSai Praneeth Prakhya		need to reboot the machine to get it to normal state). So, it's
64*63a81674SSai Praneeth Prakhya		expected that the users understand what they're doing.
65