From nobody Wed Dec 17 23:15:42 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67CCEC072A2 for ; Wed, 22 Nov 2023 03:30:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343623AbjKVDav (ORCPT ); Tue, 21 Nov 2023 22:30:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343659AbjKVDam (ORCPT ); Tue, 21 Nov 2023 22:30:42 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C258D66 for ; Tue, 21 Nov 2023 19:30:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700623838; x=1732159838; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=9uOrSuBrG6UnY5yl9x5aH3IwGdyhH17pmuoXWWC5qd0=; b=XIYDsTI8SNl3rYp1/xzyDudtSICUtrXQ+mEfB2rsL0MglgknAjJ1EB0P 7YcJu1nCHdHj+7ltmO7mPoyarQFM9D75B3WZepCR6WwKhJaVdyvTxVrTX HRyo60fbErkmxuPqavEcuW5hGvSKb2YKB+SR5PWAuDDXNBtCwIWZHgsp8 c9gfwRg0BPHgYWTFOvjeArkagTMsL0BN7v8DRgfkmq2sGmV+DHZ4CLpAv 4alH6Iw1RRNA0+xhnfZhcYNHyQS6iFBb8tD1IBLGcDtUPhL6nP6RvxxE+ NQfq76SzzrMTXs+t6Ov4DIPjt6U+Qygt4vSL8PnOgRKgFtB59XkRkl0Cg g==; X-IronPort-AV: E=McAfee;i="6600,9927,10901"; a="391742797" X-IronPort-AV: E=Sophos;i="6.04,217,1695711600"; d="scan'208";a="391742797" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2023 19:30:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,217,1695711600"; d="scan'208";a="8090186" Received: from allen-box.sh.intel.com ([10.239.159.127]) by orviesa002.jf.intel.com with ESMTP; 21 Nov 2023 19:30:37 -0800 From: Lu Baolu To: Joerg Roedel Cc: mohd.syazwan.abdul.halim@intel.com, Kunwu Chan , iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 5/7] iommu/vt-d: Add MTL to quirk list to skip TE disabling Date: Wed, 22 Nov 2023 11:26:06 +0800 Message-Id: <20231122032608.165144-6-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231122032608.165144-1-baolu.lu@linux.intel.com> References: <20231122032608.165144-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: "Abdul Halim, Mohd Syazwan" The VT-d spec requires (10.4.4 Global Command Register, TE field) that: Hardware implementations supporting DMA draining must drain any in-flight DMA read/write requests queued within the Root-Complex before switching address translation on or off and reflecting the status of the command through the TES field in the Global Status register. Unfortunately, some integrated graphic devices fail to do so after some kind of power state transition. As the result, the system might stuck in iommu_disable_translation(), waiting for the completion of TE transition. Add MTL to the quirk list for those devices and skips TE disabling if the qurik hits. Fixes: b1012ca8dc4f ("iommu/vt-d: Skip TE disabling on quirky gfx dedicated= iommu") Cc: stable@vger.kernel.org Signed-off-by: Abdul Halim, Mohd Syazwan Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20231116022324.30120-1-baolu.lu@linux.intel= .com --- drivers/iommu/intel/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 4c257ccf9dc3..68f121c28fbf 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -5077,7 +5077,7 @@ static void quirk_igfx_skip_te_disable(struct pci_dev= *dev) ver =3D (dev->device >> 8) & 0xff; if (ver !=3D 0x45 && ver !=3D 0x46 && ver !=3D 0x4c && ver !=3D 0x4e && ver !=3D 0x8a && ver !=3D 0x98 && - ver !=3D 0x9a && ver !=3D 0xa7) + ver !=3D 0x9a && ver !=3D 0xa7 && ver !=3D 0x7d) return; =20 if (risky_device(dev)) --=20 2.34.1