diff options
author | Lu Baolu <baolu.lu@linux.intel.com> | 2019-05-02 09:34:26 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2019-05-03 17:31:32 +0200 |
commit | 5daab58043ee2bca861068e2595564828f3bc663 (patch) | |
tree | d710574676cbfa1355a7280449d457a828376bd6 | |
parent | cf1ec4539a50bdfe688caad4615ca47646884316 (diff) | |
download | linux-5daab58043ee2bca861068e2595564828f3bc663.tar.gz linux-5daab58043ee2bca861068e2595564828f3bc663.tar.bz2 linux-5daab58043ee2bca861068e2595564828f3bc663.zip |
iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU
The kernel parameter igfx_off is used by users to disable
DMA remapping for the Intel integrated graphic device. It
was designed for bare metal cases where a dedicated IOMMU
is used for graphic. This doesn't apply to virtual IOMMU
case where an include-all IOMMU is used. This makes the
kernel parameter work with virtual IOMMU as well.
Cc: Ashok Raj <ashok.raj@intel.com>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Suggested-by: Kevin Tian <kevin.tian@intel.com>
Fixes: c0771df8d5297 ("intel-iommu: Export a flag indicating that the IOMMU is used for iGFX.")
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Tested-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/intel-iommu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index a814c95f73ce..a320bda2c305 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3415,9 +3415,12 @@ static int __init init_dmars(void) iommu_identity_mapping |= IDENTMAP_ALL; #ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA - iommu_identity_mapping |= IDENTMAP_GFX; + dmar_map_gfx = 0; #endif + if (!dmar_map_gfx) + iommu_identity_mapping |= IDENTMAP_GFX; + check_tylersburg_isoch(); if (iommu_identity_mapping) { |