提交 11449015 编写于 作者: L Lu Baolu 提交者: Xie XiuQi

iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU

mainline inclusion
from mainline-v5.2-rc1
commit 5daab58043ee2bca861068e2595564828f3bc663
category: bugfix
bugzilla: 15934
CVE: NA

-------------------------------------------------------------------------

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: NKevin Tian <kevin.tian@intel.com>
Fixes: c0771df8 ("intel-iommu: Export a flag indicating that the IOMMU is used for iGFX.")
Signed-off-by: NLu Baolu <baolu.lu@linux.intel.com>
Tested-by: NZhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 f48b53a8
...@@ -3387,9 +3387,12 @@ static int __init init_dmars(void) ...@@ -3387,9 +3387,12 @@ static int __init init_dmars(void)
iommu_identity_mapping |= IDENTMAP_ALL; iommu_identity_mapping |= IDENTMAP_ALL;
#ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA #ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA
iommu_identity_mapping |= IDENTMAP_GFX; dmar_map_gfx = 0;
#endif #endif
if (!dmar_map_gfx)
iommu_identity_mapping |= IDENTMAP_GFX;
check_tylersburg_isoch(); check_tylersburg_isoch();
if (iommu_identity_mapping) { if (iommu_identity_mapping) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册