aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu_init.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-12-01 09:49:45 -0500
committerJoerg Roedel <joerg.roedel@amd.com>2011-12-12 08:54:58 -0500
commit5abcdba4fa535c29f736455e37229ee97e0e7f5d (patch)
tree228892cf94773b3215fa588fe8e5fc617afa7591 /drivers/iommu/amd_iommu_init.c
parent400a28a05f2cc1a311acb4ff6ac64d8402d21678 (diff)
iommu/amd: Put IOMMUv2 capable devices in pt_domain
If the device starts to use IOMMUv2 features the dma handles need to stay valid. The only sane way to do this is to use a identity mapping for the device and not translate it by the iommu. This is implemented with this patch. Since this lifts the device-isolation there is also a new kernel parameter which allows to disable that feature. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r--drivers/iommu/amd_iommu_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index d1e5067852d..7c3fd572a23 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -146,6 +146,8 @@ u32 amd_iommu_max_pasids __read_mostly = ~0;
146 146
147bool amd_iommu_v2_present __read_mostly; 147bool amd_iommu_v2_present __read_mostly;
148 148
149bool amd_iommu_force_isolation __read_mostly;
150
149/* 151/*
150 * The ACPI table parsing functions set this variable on an error 152 * The ACPI table parsing functions set this variable on an error
151 */ 153 */
@@ -1642,6 +1644,8 @@ static int __init parse_amd_iommu_options(char *str)
1642 amd_iommu_unmap_flush = true; 1644 amd_iommu_unmap_flush = true;
1643 if (strncmp(str, "off", 3) == 0) 1645 if (strncmp(str, "off", 3) == 0)
1644 amd_iommu_disabled = true; 1646 amd_iommu_disabled = true;
1647 if (strncmp(str, "force_isolation", 15) == 0)
1648 amd_iommu_force_isolation = true;
1645 } 1649 }
1646 1650
1647 return 1; 1651 return 1;