Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp657992ybg; Thu, 19 Mar 2020 06:32:14 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvROpTLw5gQM7K+pFduTwJQSg/zPHsbdqIIuZAeIAIYLQwFMoeCeEukQI4oBo2JtbH5sVTr X-Received: by 2002:a9d:61d6:: with SMTP id h22mr2223425otk.6.1584624734457; Thu, 19 Mar 2020 06:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584624734; cv=none; d=google.com; s=arc-20160816; b=VJ7zkmeO12enJWoXoJCWjbt07eHmnXJDfbq/8c9tv0rH9D94Q56PiCikKQRleBGEsA IQys1EjeI7eHwhUzK3gg3HHN8f06ah47bJTpDEpRYGOpXvAekYo59dp1wdWcvelFj9xC WFhPZIBH3qe5UW+Bvu3cpPwgXYaa2vNCNt+PF53SpIL+Ew3BNxNhDVwupqqKrAEwq4/L utP+OZV9jk+MX+i0SsyjTbUcr4HvqEYghxuQW7GQw5KtFEgzvYARrGBGlj9o5xmLKc8H 0SZK2bzKEmZCxJhcN+eskyGXfpm7mr/icqeuSlYMQUpyKxh5bFW/wkCozyrs2scwZfiB nF0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=j5pr6KHocLMsjpSybHT5flD22QZ9pIksFHs06KKns/k=; b=cHP3InfA5ncnlAVDzuCoUwDMLm2RMKkgrczcjqOEBUoZ2L7+6Pyx5TycHdesp9K7h5 TR9YUwdL9e/Kh7OkjSw9HLHQHdZRTMOLyOe/G3+Med/RQPyy8pL09o8XSQUm80UEa/k3 mdZ3vDkM/X43R3YURq0K53NCiNg/maRc6qcLp66HUNGvVypya1mQzXjtllMY9PacPTb/ Q2l+sKG9xA60UcsYbrXGR58dBh5zpq/l65bl091sk5ExTYND+ipJPq4FmD1o7sEYHH34 hvrQU/N3dcUIF3Ni8GB9niVv0WkanWwuZZPumS1BGYdBGmhx2rqmE9u8rYeeXLXkUJmi K3SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gQ/jzaKG"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si1299541oto.260.2020.03.19.06.32.02; Thu, 19 Mar 2020 06:32:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gQ/jzaKG"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729646AbgCSNR3 (ORCPT + 99 others); Thu, 19 Mar 2020 09:17:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:38640 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729502AbgCSNRZ (ORCPT ); Thu, 19 Mar 2020 09:17:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 86A59206D7; Thu, 19 Mar 2020 13:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584623845; bh=dWCknQIVigSMJRo47GUvgMQ8qDQxjeuEKjH7jux1uQ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gQ/jzaKGvUanSZ5rkTrtDgcaYRK4B61UKBXaHoDBn3IRbZofdtjLFKeUeia0sKnJ3 D69D9p4KUCWaorPjoA5TQWIJZKC7HkYQZ2g9VfcT+5xiruTg+ofysRVWhuWmS1pp3o o+OAKPeHMupUc2SouMLF0P9011EYLgk5562Mydwg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Lu Baolu , Joerg Roedel Subject: [PATCH 4.14 41/99] iommu/vt-d: quirk_ioat_snb_local_iommu: replace WARN_TAINT with pr_warn + add_taint Date: Thu, 19 Mar 2020 14:03:19 +0100 Message-Id: <20200319123954.325742462@linuxfoundation.org> X-Mailer: git-send-email 2.25.2 In-Reply-To: <20200319123941.630731708@linuxfoundation.org> References: <20200319123941.630731708@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede commit 81ee85d0462410de8eeeec1b9761941fd6ed8c7b upstream. 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. Fixes: 556ab45f9a77 ("ioat2: catch and recover from broken vtd configurations v6") Signed-off-by: Hans de Goede Acked-by: Lu Baolu Link: https://lore.kernel.org/r/20200309182510.373875-1-hdegoede@redhat.com BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=701847 Signed-off-by: Joerg Roedel Signed-off-by: Greg Kroah-Hartman --- drivers/iommu/intel-iommu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -3984,10 +3984,11 @@ static void quirk_ioat_snb_local_iommu(s /* 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);