[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201121135620.3496419-5-baolu.lu@linux.intel.com>
Date: Sat, 21 Nov 2020 21:56:20 +0800
From: Lu Baolu <baolu.lu@...ux.intel.com>
To: Will Deacon <will@...nel.org>, Joerg Roedel <joro@...tes.org>
Cc: Ashok Raj <ashok.raj@...el.com>, Christoph Hellwig <hch@....de>,
Sohil Mehta <sohil.mehta@...el.com>,
Robin Murphy <robin.murphy@....com>,
Jacob Pan <jacob.jun.pan@...ux.intel.com>,
iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>,
Will Deacon <will.deacon@....com>,
Lu Baolu <baolu.lu@...ux.intel.com>
Subject: [PATCH v9 4/4] iommu: Document usage of "/sys/kernel/iommu_groups/<grp_id>/type" file
From: Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>
The default domain type of an iommu group can be changed by writing to
"/sys/kernel/iommu_groups/<grp_id>/type" file. Hence, document it's usage
and more importantly spell out its limitations.
Cc: Christoph Hellwig <hch@....de>
Cc: Joerg Roedel <joro@...tes.org>
Cc: Ashok Raj <ashok.raj@...el.com>
Cc: Will Deacon <will.deacon@....com>
Cc: Sohil Mehta <sohil.mehta@...el.com>
Cc: Robin Murphy <robin.murphy@....com>
Cc: Jacob Pan <jacob.jun.pan@...ux.intel.com>
Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>
Signed-off-by: Lu Baolu <baolu.lu@...ux.intel.com>
---
.../ABI/testing/sysfs-kernel-iommu_groups | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-kernel-iommu_groups b/Documentation/ABI/testing/sysfs-kernel-iommu_groups
index 017f5bc3920c..407b1628d7fd 100644
--- a/Documentation/ABI/testing/sysfs-kernel-iommu_groups
+++ b/Documentation/ABI/testing/sysfs-kernel-iommu_groups
@@ -33,3 +33,32 @@ Description: In case an RMRR is used only by graphics or USB devices
it is now exposed as "direct-relaxable" instead of "direct".
In device assignment use case, for instance, those RMRR
are considered to be relaxable and safe.
+
+What: /sys/kernel/iommu_groups/<grp_id>/type
+Date: November 2020
+KernelVersion: v5.11
+Contact: Sai Praneeth Prakhya <sai.praneeth.prakhya@...el.com>
+Description: /sys/kernel/iommu_groups/<grp_id>/type shows the type of default
+ domain in use by iommu for this group. See include/linux/iommu.h
+ for possible values. A privileged user could request kernel to
+ change the group type by writing to this file. Presently, only
+ three types of request are supported:
+ 1. DMA: All the DMA transactions from the device in this group
+ are translated by the iommu.
+ 2. identity: All the DMA transactions from the device in this
+ group are *not* translated by the iommu.
+ 3. auto: Change to the type the device was booted with.
+ Note:
+ -----
+ The default domain type of a group may be modified only when
+ 1. The group has *only* one device
+ 2. The device in the group is not bound to any device driver.
+ So, the users must unbind the appropriate driver before
+ changing the default domain type.
+ Caution:
+ --------
+ Unbinding a device driver will take away the driver's control
+ over the device and if done on devices that host root file
+ system could lead to catastrophic effects (the users might
+ need to reboot the machine to get it to normal state). So, it's
+ expected that the users understand what they're doing.
--
2.25.1
Powered by blists - more mailing lists