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.
3663a81674SSai Praneeth Prakhya
3763a81674SSai Praneeth PrakhyaWhat:		/sys/kernel/iommu_groups/<grp_id>/type
3863a81674SSai Praneeth PrakhyaDate:		November 2020
3963a81674SSai Praneeth PrakhyaKernelVersion:	v5.11
4063a81674SSai Praneeth PrakhyaContact:	Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
4163a81674SSai Praneeth PrakhyaDescription:	/sys/kernel/iommu_groups/<grp_id>/type shows the type of default
4263a81674SSai Praneeth Prakhya		domain in use by iommu for this group. See include/linux/iommu.h
43*62c9917dSLu Baolu		for possible read values. A privileged user could request kernel to
44*62c9917dSLu Baolu		change the group type by writing to this file. Valid write values:
45*62c9917dSLu Baolu
46*62c9917dSLu Baolu		========  ======================================================
47*62c9917dSLu Baolu		DMA       All the DMA transactions from the device in this group
4863a81674SSai Praneeth Prakhya		          are translated by the iommu.
49*62c9917dSLu Baolu		identity  All the DMA transactions from the device in this group
50*62c9917dSLu Baolu		          are not translated by the iommu.
51*62c9917dSLu Baolu		auto      Change to the type the device was booted with.
52*62c9917dSLu Baolu		========  ======================================================
53*62c9917dSLu Baolu
5463a81674SSai Praneeth Prakhya		The default domain type of a group may be modified only when
55*62c9917dSLu Baolu
56*62c9917dSLu Baolu		- The group has only one device.
57*62c9917dSLu Baolu		- The device in the group is not bound to any device driver.
5863a81674SSai Praneeth Prakhya		  So, the users must unbind the appropriate driver before
5963a81674SSai Praneeth Prakhya		  changing the default domain type.
60*62c9917dSLu Baolu
6163a81674SSai Praneeth Prakhya		Unbinding a device driver will take away the driver's control
6263a81674SSai Praneeth Prakhya		over the device and if done on devices that host root file
6363a81674SSai Praneeth Prakhya		system could lead to catastrophic effects (the users might
6463a81674SSai Praneeth Prakhya		need to reboot the machine to get it to normal state). So, it's
6563a81674SSai Praneeth Prakhya		expected that the users understand what they're doing.
66