Skip to content

Commit

Permalink
iommu: Permit iommu.strict for AMD and Intel drivers
Browse files Browse the repository at this point in the history
Permit AMD and intel drivers to use iommu.strict.

Note that both respective params are deprecated in kernel-parameters.txt .

Signed-off-by: John Garry <john.garry@huawei.com>
  • Loading branch information
John Garry committed Jun 14, 2021
1 parent f3083f1 commit 2375a2d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Documentation/admin-guide/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@
amd_iommu= [HW,X86-64]
Pass parameters to the AMD IOMMU driver in the system.
Possible values are:
fullflush - enable flushing of IO/TLB entries when
fullflush - Deprecated, use iommu.strict instead.
Enable flushing of IO/TLB entries when
they are unmapped. Otherwise they are
flushed before they will be reused, which
is a lot of faster
Expand Down Expand Up @@ -1948,6 +1949,7 @@
this case, gfx device will use physical address for
DMA.
strict [Default Off]
Deprecated, use iommu.strict instead.
With this option on every unmap_single operation will
result in a hardware IOTLB flush operation as opposed
to batching them for performance.
Expand Down Expand Up @@ -2043,7 +2045,7 @@
forcing Dual Address Cycle for PCI cards supporting
greater than 32-bit addressing.

iommu.strict= [ARM64] Configure TLB invalidation behaviour
iommu.strict= [ARM64, X86] Configure TLB invalidation behaviour
Format: { "0" | "1" }
0 - Lazy mode.
Request that DMA unmap operations use deferred
Expand Down
4 changes: 3 additions & 1 deletion drivers/iommu/amd/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -3097,8 +3097,10 @@ static int __init parse_amd_iommu_intr(char *str)
static int __init parse_amd_iommu_options(char *str)
{
for (; *str; ++str) {
if (strncmp(str, "fullflush", 9) == 0)
if (strncmp(str, "fullflush", 9) == 0) {
pr_warn("amd_iommu=fullflush deprecated; use iommu.strict instead\n");
iommu_set_dma_strict(true);
}
if (strncmp(str, "force_enable", 12) == 0)
amd_iommu_force_enable = true;
if (strncmp(str, "off", 3) == 0)
Expand Down
1 change: 1 addition & 0 deletions drivers/iommu/intel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ static int __init intel_iommu_setup(char *str)
pr_warn("intel_iommu=forcedac deprecated; use iommu.forcedac instead\n");
iommu_dma_forcedac = true;
} else if (!strncmp(str, "strict", 6)) {
pr_warn("intel_iommu=strict deprecated; use iommu.strict instead\n");
iommu_set_dma_strict(true);
} else if (!strncmp(str, "sp_off", 6)) {
pr_info("Disable supported super page\n");
Expand Down

0 comments on commit 2375a2d

Please sign in to comment.