From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D90DC10F25 for ; Tue, 10 Mar 2020 01:46:12 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 420FE20637 for ; Tue, 10 Mar 2020 01:46:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 420FE20637 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 254B3884E0; Tue, 10 Mar 2020 01:46:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ziuN4lGkj9cq; Tue, 10 Mar 2020 01:46:11 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 6CDDE86A1E; Tue, 10 Mar 2020 01:46:11 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 4D1FAC1D74; Tue, 10 Mar 2020 01:46:11 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id E6A5FC0177 for ; Tue, 10 Mar 2020 01:46:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id D56DC888B0 for ; Tue, 10 Mar 2020 01:46:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tgWoseYkc0fj for ; Tue, 10 Mar 2020 01:46:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by hemlock.osuosl.org (Postfix) with ESMTPS id 2FF71888AC for ; Tue, 10 Mar 2020 01:46:09 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Mar 2020 18:46:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,535,1574150400"; d="scan'208";a="235774968" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.215.55]) ([10.254.215.55]) by fmsmga008.fm.intel.com with ESMTP; 09 Mar 2020 18:46:07 -0700 Subject: Re: [PATCH] iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint To: Hans de Goede , David Woodhouse , Joerg Roedel References: <20200309182510.373875-1-hdegoede@redhat.com> From: Lu Baolu Message-ID: <4e4a73d0-50db-49fa-0e46-468032bf9775@linux.intel.com> Date: Tue, 10 Mar 2020 09:46:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200309182510.373875-1-hdegoede@redhat.com> Content-Language: en-US Cc: iommu@lists.linux-foundation.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On 2020/3/10 2:25, Hans de Goede wrote: > Quoting from the comment describing the WARN functions in > include/asm-generic/bug.h: > > * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report > * significant kernel issues that need prompt attention if they should ever > * appear at runtime. > * > * Do not use these macros when checking for invalid external inputs > > The (buggy) firmware tables which the dmar code was calling WARN_TAINT > for really are invalid external inputs. They are not under the kernel's > control and the issues in them cannot be fixed by a kernel update. > So logging a backtrace, which invites bug reports to be filed about this, > is not helpful. > > BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=701847 > Fixes: 556ab45f9a77 ("ioat2: catch and recover from broken vtd configurations v6") > Signed-off-by: Hans de Goede Acked-by: Lu Baolu Best regards, baolu > --- > drivers/iommu/intel-iommu.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c > index 3857a5cd1a75..8fd132f8e885 100644 > --- a/drivers/iommu/intel-iommu.c > +++ b/drivers/iommu/intel-iommu.c > @@ -4261,10 +4261,11 @@ static void quirk_ioat_snb_local_iommu(struct pci_dev *pdev) > > /* we know that the this iommu should be at offset 0xa000 from vtbar */ > drhd = dmar_find_matched_drhd_unit(pdev); > - if (WARN_TAINT_ONCE(!drhd || drhd->reg_base_addr - vtbar != 0xa000, > - TAINT_FIRMWARE_WORKAROUND, > - "BIOS assigned incorrect VT-d unit for Intel(R) QuickData Technology device\n")) > + if (!drhd || drhd->reg_base_addr - vtbar != 0xa000) { > + pr_warn_once(FW_BUG "BIOS assigned incorrect VT-d unit for Intel(R) QuickData Technology device\n"); > + add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK); > pdev->dev.archdata.iommu = DUMMY_DEVICE_DOMAIN_INFO; > + } > } > DECLARE_PCI_FIXUP_ENABLE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_IOAT_SNB, quirk_ioat_snb_local_iommu); > > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu