Skip to content

Commit

Permalink
iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU
Browse files Browse the repository at this point in the history
[ Upstream commit 5daab58043ee2bca861068e2595564828f3bc663 ]

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 <[email protected]>
Cc: Jacob Pan <[email protected]>
Suggested-by: Kevin Tian <[email protected]>
Fixes: c0771df ("intel-iommu: Export a flag indicating that the IOMMU is used for iGFX.")
Signed-off-by: Lu Baolu <[email protected]>
Tested-by: Zhenyu Wang <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: John Vincent <[email protected]>
Signed-off-by: John Vincent <[email protected]>
  • Loading branch information
LuBaolu authored and ravindu644 committed Aug 18, 2024
1 parent 0ef021b commit 93e6212
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -3361,9 +3361,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) {
Expand Down

0 comments on commit 93e6212

Please sign in to comment.