From nobody Thu Sep 18 15:31:11 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 4ECE1C4321E for ; Mon, 5 Dec 2022 13:21:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232172AbiLENVp (ORCPT ); Mon, 5 Dec 2022 08:21:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232177AbiLENVg (ORCPT ); Mon, 5 Dec 2022 08:21:36 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9099D1C424 for ; Mon, 5 Dec 2022 05:21:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670246495; x=1701782495; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tvirCoktsOJCDgLp5DXt2SRw2Wm/ltzUXfTouRmkaSQ=; b=ildT5qOLNqHg8JiLzvQKlWMSeOy4AGtPGWoTFntjK5scufuvPD6pbU4R NVDZq3RT6xkwg+XMNlVAO/ys9oEJuo8m3XL2oAbG72yRG0heZUidkwwua yCQSkS9IC9Ql5e8bOXvPRIZG9axmOGiBMcG1DMgsmFnSVnhY5aZhzkOB8 WPbHSNRIug6IIaJ4q4idsIRNFzwGxRd8aU05E9nfj8Siq/XcDTv+X787V W8Yn+PiKjsu/WGJWbuQ5l492uHHyMK3gPT0vElqfGAxrc3ju17Lz25NF9 dfXpSdHm6YHcblpEdx3OJC8PZOgRjmeAhPh8tFY6J94bcn3jYbntXpQQg w==; X-IronPort-AV: E=McAfee;i="6500,9779,10551"; a="315046107" X-IronPort-AV: E=Sophos;i="5.96,219,1665471600"; d="scan'208";a="315046107" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2022 05:21:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10551"; a="676583250" X-IronPort-AV: E=Sophos;i="5.96,219,1665471600"; d="scan'208";a="676583250" Received: from allen-box.sh.intel.com ([10.239.159.48]) by orsmga008.jf.intel.com with ESMTP; 05 Dec 2022 05:21:33 -0800 From: Lu Baolu To: Joerg Roedel Cc: Jacob Pan , Ashok Raj , iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] iommu/vt-d: Fix buggy QAT device mask Date: Mon, 5 Dec 2022 21:14:12 +0800 Message-Id: <20221205131412.2003159-2-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221205131412.2003159-1-baolu.lu@linux.intel.com> References: <20221205131412.2003159-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: Jacob Pan Impacted QAT device IDs that need extra dtlb flush quirk is ranging from 0x4940 to 0x4943. After bitwise AND device ID with 0xfffc the result should be 0x4940 instead of 0x494c to identify these devices. Fixes: e65a6897be5e ("iommu/vt-d: Add a fix for devices need extra dtlb flu= sh") Reported-by: Raghunathan Srinivasan Signed-off-by: Ashok Raj Signed-off-by: Jacob Pan Link: https://lore.kernel.org/r/20221203005610.2927487-1-jacob.jun.pan@linu= x.intel.com Signed-off-by: Lu Baolu --- 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 5287efe247b1..644ca49e8cf8 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -1402,7 +1402,7 @@ static void domain_update_iotlb(struct dmar_domain *d= omain) * check because it applies only to the built-in QAT devices and it doesn't * grant additional privileges. */ -#define BUGGY_QAT_DEVID_MASK 0x494c +#define BUGGY_QAT_DEVID_MASK 0x4940 static bool dev_needs_extra_dtlb_flush(struct pci_dev *pdev) { if (pdev->vendor !=3D PCI_VENDOR_ID_INTEL) --=20 2.34.1