Message ID | 20240127064512.16744-1-baolu.lu@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-41082-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2395:b0:106:343:edcb with SMTP id gw21csp417485dyb; Sat, 27 Jan 2024 02:27:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqxSZwmAO/8Ikr4ycD8H+K0kGW3SyPEkHw+oAyMXvaH8Ydj8MSHQSaKD2lkgUnnPdxbrpR X-Received: by 2002:a05:6a20:6a86:b0:199:a6cb:20ab with SMTP id bi6-20020a056a206a8600b00199a6cb20abmr1087051pzb.123.1706351247490; Sat, 27 Jan 2024 02:27:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706351247; cv=pass; d=google.com; s=arc-20160816; b=bucfK6bOUdrEzB+rU2B6mTcL6SJJ5RFTysTjDJI+AHzi4XvXpXYKrWic0Yd7OdaVyo o49KlvZYp6o8gX7R1Y/R30dJGAS37waBySm62Wm/4Jv6yxu422enWPaZ9ICvCYWldjUv 018jWdoUw8bfX5X8QzasaP4IW6oIYaCe6MBvvvhbncHaB+V/VMeMZ3BaX2JxRu1gLDDu S0kGBJgeEbGdW7h/hiN+BbQ3ivbg8ckYdsqWb1HDcQ7SgdACq0ZyuEJJUw0HAyTEqQcP ELQ9oQ9cUWsaYC15GmUQgaSrdX9HbX5xnEpUPmGuZlulcw9CuGSKd4otiAHY2Pac7jXA HfaA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=U8wmd4kl4JoijUCJkjQ/f7LLi+gdpP4+AcxN+chQMiE=; fh=5K4v/0ku97kpa0vTvhWLyUEWwXZiIFVMmzwLLirrjJ4=; b=v5+bnJ1ILy+Vynor5hy57fv5muLQrlYgBRWloua/L9bJhdADLQ3mvnRpHgu45S8l/h 15pBAuhGwlGFe7PFI7BM6fFL4TAOe8rI5tRShon6Q4a1OZ7B6DqC9HxdJ9RkhOwjkt1x ivZCIEfb7BLHKUNRDTYpQGmnNmwLUj8lvg3IBEEmN92tqKEsKH+kQ7NR8cRUQqgBgIen mRMk/F42Sg5QniGN+vBGZ+ARrmtLgrRmYeAe5Z7oOBIgX4rYu4M8smsJnJtHwAwzvUW/ JeRouDU1msNPav+Hma2GtqvCUW3hidsFPc411ghNqhOp7Vi6PD5q8pmFzsDkxIeiLarB 4CSA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HPHoHJPH; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-41082-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41082-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q65-20020a632a44000000b005cd8b5dfe9csi2607741pgq.491.2024.01.27.02.27.27 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 02:27:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41082-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HPHoHJPH; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-41082-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41082-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2C271285F60 for <ouuuleilei@gmail.com>; Sat, 27 Jan 2024 06:51:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ED02E1D6B8; Sat, 27 Jan 2024 06:50:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HPHoHJPH" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE8EE17744 for <linux-kernel@vger.kernel.org>; Sat, 27 Jan 2024 06:50:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706338247; cv=none; b=hA3BP/l/px5PUqVzWTmvYYPJUSUk/qrNtjnqeiWCiROBwirkV7JsKmmxvOnU5YoLJ2zm0mfLIaKyPpE6c79tKvPJF6PJzClqGKod3Eg1GmtxaJ72rPA6LkFF3/Q61mof54NqmpQLuhSI7dGecvUsud5ac7z+PEwY7Ce3zOTVCqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706338247; c=relaxed/simple; bh=baNrkmKkIf2EbMQeJAh+ylYFxPSnzWuHm7wIxFgXO2A=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Uqf/6ORupk2GY0LVmR6xQTjuBIm2OPB3nGjuXaeKCkZPFHMpz0MLbnVjTCzrAEkF5ZyRUijI1r4av6O+TopMhoPzivh8wnPG9VrVHiSZs4zTnsN4nt8Pw42yoE3n6nMM6LUXX0Jd6DPuo8NPxzb6U9r0Qc0VcmIK1Bv5lGCxsx4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HPHoHJPH; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706338246; x=1737874246; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=baNrkmKkIf2EbMQeJAh+ylYFxPSnzWuHm7wIxFgXO2A=; b=HPHoHJPHYwMso5g+MoFxajFpwyozfGLxLRmZRC302Y9voicTN5EK9C1R 1J6WleRnorUJWuHBTPQJZDkrWgrL2NwlPB0Sq9m8QlOIlyiIzIUcsVXVC WYD8vjAZUTYYjupuQK0Ci5zRZZbJaV7Oz1xRjc2QCu/ndd2LF38FyvYYF 1WaAPL8XEvmHw9dDVRFEOqcR8cnvfbVX3oDt1tl4kMQvgDkg5hfHUDECj SSC0rR98eup4hjRqsVs+O3XsUzNBRBJ/xl+zqR56vg4hmHAXUZ7QVJCnq 5iae/EVDDnCVEqdezyXeTKvaXXA2OqYUvNZSzG9pgDQ/dlLW7axzqmJfz g==; X-IronPort-AV: E=McAfee;i="6600,9927,10964"; a="9769105" X-IronPort-AV: E=Sophos;i="6.05,220,1701158400"; d="scan'208";a="9769105" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2024 22:50:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,220,1701158400"; d="scan'208";a="2894508" Received: from allen-box.sh.intel.com ([10.239.159.127]) by fmviesa003.fm.intel.com with ESMTP; 26 Jan 2024 22:50:42 -0800 From: Lu Baolu <baolu.lu@linux.intel.com> To: Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>, Robin Murphy <robin.murphy@arm.com>, Jason Gunthorpe <jgg@ziepe.ca>, Kevin Tian <kevin.tian@intel.com> Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Lu Baolu <baolu.lu@linux.intel.com> Subject: [PATCH 1/1] iommu/vt-d: Remove INTEL_IOMMU_BROKEN_GFX_WA Date: Sat, 27 Jan 2024 14:45:12 +0800 Message-Id: <20240127064512.16744-1-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789238965572645892 X-GMAIL-MSGID: 1789238965572645892 |
Series |
[1/1] iommu/vt-d: Remove INTEL_IOMMU_BROKEN_GFX_WA
|
|
Commit Message
Baolu Lu
Jan. 27, 2024, 6:45 a.m. UTC
Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA option for
broken graphics drivers") was introduced 24 years ago as a temporary
workaround for graphics drivers that used physical addresses for DMA and
avoided DMA APIs. This workaround was disabled by default.
As 24 years have passed, it is expected that graphics driver developers
have migrated their drivers to use kernel DMA APIs. Therefore, this
workaround is no longer required and could been removed.
Suggested-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
drivers/iommu/intel/iommu.c | 4 ----
drivers/iommu/intel/Kconfig | 11 -----------
2 files changed, 15 deletions(-)
Comments
> From: Lu Baolu <baolu.lu@linux.intel.com> > Sent: Saturday, January 27, 2024 2:45 PM > > Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA > option for > broken graphics drivers") was introduced 24 years ago as a temporary > workaround for graphics drivers that used physical addresses for DMA and > avoided DMA APIs. This workaround was disabled by default. > > As 24 years have passed, it is expected that graphics driver developers > have migrated their drivers to use kernel DMA APIs. Therefore, this > workaround is no longer required and could been removed. > > Suggested-by: Kevin Tian <kevin.tian@intel.com> > Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com>
On Sat, Jan 27, 2024 at 02:45:12PM +0800, Lu Baolu wrote: > Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA option for > broken graphics drivers") was introduced 24 years ago as a temporary > workaround for graphics drivers that used physical addresses for DMA and > avoided DMA APIs. This workaround was disabled by default. > > As 24 years have passed, it is expected that graphics driver developers > have migrated their drivers to use kernel DMA APIs. Therefore, this > workaround is no longer required and could been removed. How about you Cc the intel graphics maintainers and get a confirmation?
> From: Christoph Hellwig <hch@infradead.org> > Sent: Monday, January 29, 2024 2:03 PM > > On Sat, Jan 27, 2024 at 02:45:12PM +0800, Lu Baolu wrote: > > Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA > option for > > broken graphics drivers") was introduced 24 years ago as a temporary > > workaround for graphics drivers that used physical addresses for DMA and > > avoided DMA APIs. This workaround was disabled by default. > > > > As 24 years have passed, it is expected that graphics driver developers > > have migrated their drivers to use kernel DMA APIs. Therefore, this > > workaround is no longer required and could been removed. > > How about you Cc the intel graphics maintainers and get a confirmation? > in the worst case there is still "igfx_off" option available to achieve the same effect. there is really no good reason to keep this config option so long while it was intended to be removed in 2.6.32. but yes the Intel graphics maintainers should be CCed.
On 2024/1/29 14:08, Tian, Kevin wrote: >> From: Christoph Hellwig <hch@infradead.org> >> Sent: Monday, January 29, 2024 2:03 PM >> >> On Sat, Jan 27, 2024 at 02:45:12PM +0800, Lu Baolu wrote: >>> Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA >> option for >>> broken graphics drivers") was introduced 24 years ago as a temporary >>> workaround for graphics drivers that used physical addresses for DMA and >>> avoided DMA APIs. This workaround was disabled by default. >>> >>> As 24 years have passed, it is expected that graphics driver developers >>> have migrated their drivers to use kernel DMA APIs. Therefore, this >>> workaround is no longer required and could been removed. >> >> How about you Cc the intel graphics maintainers and get a confirmation? >> > > in the worst case there is still "igfx_off" option available to achieve the > same effect. > > there is really no good reason to keep this config option so long while it > was intended to be removed in 2.6.32. > > but yes the Intel graphics maintainers should be CCed. > You both are right. I will add above in the commit message and Cc graphic guys with a new upgraded version. Best regards, baolu
On 2024-01-29 7:24 am, Baolu Lu wrote: > On 2024/1/29 14:08, Tian, Kevin wrote: >>> From: Christoph Hellwig <hch@infradead.org> >>> Sent: Monday, January 29, 2024 2:03 PM >>> >>> On Sat, Jan 27, 2024 at 02:45:12PM +0800, Lu Baolu wrote: >>>> Commit 62edf5dc4a524 ("intel-iommu: Restore DMAR_BROKEN_GFX_WA >>> option for >>>> broken graphics drivers") was introduced 24 years ago as a temporary >>>> workaround for graphics drivers that used physical addresses for DMA >>>> and >>>> avoided DMA APIs. This workaround was disabled by default. >>>> >>>> As 24 years have passed, it is expected that graphics driver developers >>>> have migrated their drivers to use kernel DMA APIs. Therefore, this >>>> workaround is no longer required and could been removed. >>> >>> How about you Cc the intel graphics maintainers and get a confirmation? >>> >> >> in the worst case there is still "igfx_off" option available to >> achieve the >> same effect. >> >> there is really no good reason to keep this config option so long >> while it >> was intended to be removed in 2.6.32. >> >> but yes the Intel graphics maintainers should be CCed. >> > > You both are right. > > I will add above in the commit message and Cc graphic guys with a new > upgraded version. Right, you're not removing the actual workaround at all, you're only removing the Kconfig option to force it on by default, which clearly nobody is using since it's been dead code since 2009 with 0c02a20ff769 ("intel-iommu: Kill DMAR_BROKEN_GFX_WA option.") Cheers, Robin.
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 6fb5f6fceea1..fc52fcd786aa 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -2660,10 +2660,6 @@ static int __init init_dmars(void) iommu_set_root_entry(iommu); } -#ifdef CONFIG_INTEL_IOMMU_BROKEN_GFX_WA - dmar_map_gfx = 0; -#endif - if (!dmar_map_gfx) iommu_identity_mapping |= IDENTMAP_GFX; diff --git a/drivers/iommu/intel/Kconfig b/drivers/iommu/intel/Kconfig index 012cd2541a68..d2d34eb28d94 100644 --- a/drivers/iommu/intel/Kconfig +++ b/drivers/iommu/intel/Kconfig @@ -64,17 +64,6 @@ config INTEL_IOMMU_DEFAULT_ON one is found. If this option is not selected, DMAR support can be enabled by passing intel_iommu=on to the kernel. -config INTEL_IOMMU_BROKEN_GFX_WA - bool "Workaround broken graphics drivers (going away soon)" - depends on BROKEN && X86 - help - Current Graphics drivers tend to use physical address - for DMA and avoid using DMA APIs. Setting this config - option permits the IOMMU driver to set a unity map for - all the OS-visible memory. Hence the driver can continue - to use physical addresses for DMA, at least until this - option is removed in the 2.6.32 kernel. - config INTEL_IOMMU_FLOPPY_WA def_bool y depends on X86