Back to home page

OSCL-LXR

 
 

    


0001 What:           /sys/kernel/iommu_groups/
0002 Date:           May 2012
0003 KernelVersion:  v3.5
0004 Contact:        Alex Williamson <alex.williamson@redhat.com>
0005 Description:    /sys/kernel/iommu_groups/ contains a number of sub-
0006                 directories, each representing an IOMMU group.  The
0007                 name of the sub-directory matches the iommu_group_id()
0008                 for the group, which is an integer value.  Within each
0009                 subdirectory is another directory named "devices" with
0010                 links to the sysfs devices contained in this group.
0011                 The group directory also optionally contains a "name"
0012                 file if the IOMMU driver has chosen to register a more
0013                 common name for the group.
0014 Users:
0015 
0016 What:           /sys/kernel/iommu_groups/reserved_regions
0017 Date:           January 2017
0018 KernelVersion:  v4.11
0019 Contact:        Eric Auger <eric.auger@redhat.com>
0020 Description:    /sys/kernel/iommu_groups/reserved_regions list IOVA
0021                 regions that are reserved. Not necessarily all
0022                 reserved regions are listed. This is typically used to
0023                 output direct-mapped, MSI, non mappable regions. Each
0024                 region is described on a single line: the 1st field is
0025                 the base IOVA, the second is the end IOVA and the third
0026                 field describes the type of the region.
0027 
0028                 Since kernel 5.3, in case an RMRR is used only by graphics or
0029                 USB devices it is now exposed as "direct-relaxable" instead
0030                 of "direct". In device assignment use case, for instance,
0031                 those RMRR are considered to be relaxable and safe.
0032 
0033 What:           /sys/kernel/iommu_groups/<grp_id>/type
0034 Date:           November 2020
0035 KernelVersion:  v5.11
0036 Contact:        Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com>
0037 Description:    /sys/kernel/iommu_groups/<grp_id>/type shows the type of default
0038                 domain in use by iommu for this group. See include/linux/iommu.h
0039                 for possible read values. A privileged user could request kernel to
0040                 change the group type by writing to this file. Valid write values:
0041 
0042                 ========  ======================================================
0043                 DMA       All the DMA transactions from the device in this group
0044                           are translated by the iommu.
0045                 DMA-FQ    As above, but using batched invalidation to lazily
0046                           remove translations after use. This may offer reduced
0047                           overhead at the cost of reduced memory protection.
0048                 identity  All the DMA transactions from the device in this group
0049                           are not translated by the iommu. Maximum performance
0050                           but zero protection.
0051                 auto      Change to the type the device was booted with.
0052                 ========  ======================================================
0053 
0054                 The default domain type of a group may be modified only when
0055 
0056                 - The group has only one device.
0057                 - The device in the group is not bound to any device driver.
0058                   So, the users must unbind the appropriate driver before
0059                   changing the default domain type.
0060 
0061                 Unbinding a device driver will take away the driver's control
0062                 over the device and if done on devices that host root file
0063                 system could lead to catastrophic effects (the users might
0064                 need to reboot the machine to get it to normal state). So, it's
0065                 expected that the users understand what they're doing.