From: Sasha Levin <sashal@kernel.org> To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sasha Levin <sashal@kernel.org>, Kevin Tian <kevin.tian@intel.com>, Joerg Roedel <jroedel@suse.de>, Ashok Raj <ashok.raj@intel.com>, Zhenyu Wang <zhenyuw@linux.intel.com>, iommu@lists.linux-foundation.org Subject: [PATCH AUTOSEL 4.19 329/671] iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU Date: Thu, 16 Jan 2020 11:59:27 -0500 Message-ID: <20200116170509.12787-66-sashal@kernel.org> (raw) In-Reply-To: <20200116170509.12787-1-sashal@kernel.org> From: Lu Baolu <baolu.lu@linux.intel.com> [ 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 <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> Signed-off-by: Sasha Levin <sashal@kernel.org> --- drivers/iommu/intel-iommu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index b9af2419006f..abbbc614c522 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3387,9 +3387,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) { -- 2.20.1 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu
next parent reply index Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20200116170509.12787-1-sashal@kernel.org> 2020-01-16 16:59 ` Sasha Levin [this message] 2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 381/671] iommu: Add missing new line for dma type Sasha Levin 2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 382/671] iommu: Use right function to get group for device Sasha Levin 2020-01-16 17:00 ` [PATCH AUTOSEL 4.19 405/671] iommu/vt-d: Duplicate iommu_resv_region objects per device list Sasha Levin 2020-01-16 17:01 ` [PATCH AUTOSEL 4.19 442/671] iommu/amd: Make iommu_disable safer Sasha Levin 2020-01-16 17:02 ` [PATCH AUTOSEL 4.19 510/671] iommu/mediatek: Fix iova_to_phys PA start for 4GB mode Sasha Levin 2020-01-16 17:03 ` [PATCH AUTOSEL 4.19 560/671] iommu/amd: Wait for completion of IOTLB flush in attach_device Sasha Levin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200116170509.12787-66-sashal@kernel.org \ --to=sashal@kernel.org \ --cc=ashok.raj@intel.com \ --cc=iommu@lists.linux-foundation.org \ --cc=jroedel@suse.de \ --cc=kevin.tian@intel.com \ --cc=linux-kernel@vger.kernel.org \ --cc=stable@vger.kernel.org \ --cc=zhenyuw@linux.intel.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
IOMMU Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-iommu/0 linux-iommu/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-iommu linux-iommu/ https://lore.kernel.org/linux-iommu \ iommu@lists.linux-foundation.org public-inbox-index linux-iommu Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.linux-foundation.lists.iommu AGPL code for this site: git clone https://public-inbox.org/public-inbox.git