Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4406545pxb; Tue, 31 Aug 2021 04:32:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyci6bMBESpVoo+dHt2ueM5ubaPmjXSZDazygi6uUJO8WRoFlZbj2/GA5YyehigYT5uFLWi X-Received: by 2002:a92:c081:: with SMTP id h1mr18499246ile.193.1630409521534; Tue, 31 Aug 2021 04:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630409521; cv=none; d=google.com; s=arc-20160816; b=voqbEO7chqK1hmMWk/iiXM/7T4BUtf21c+/tw1e3IRmmqKRDEcXM6N1hB0Sy/JpGYW jcn5wnbp+OLNsyFpLJlTC6D7ZB9UrzNb8l9ZyLQNI7E5DFqEi+UfUR9lsLnIgkN8DtYx dHT8rC6meRhDy9Ggb2Y1fp8iicNAF2sbSWKVpVru/CfEt/1wWa2yqX071ABCOIgUsK13 Ziba+VutXGn8f2srl21Slopsb8Wp+30KTz8MrU3xK4uwgF+KNWoGwoz/2xttG9s2dSfS FiohCc19/ojlpK+GYUKZ8EOmD1Epx/oH8nPACqpvMVCdtVNRytrOe+HBn5gGF0jRB0UN zWdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=aGw+fhB1NtJTJraefMc9/yIs87+/7JNH9vt/VdrkMW0=; b=o3ml654Jf1wRKTKCgNKm06k0PcE1w/uOZ1KfRof0E4N4LdQHgeYUT2c5w9PjCnVlMz P07e4pk7Bh/n5VJGp3RauyujvgegP8dz4HGIjPtz4hNU5XGAXRumP+xcSqjxYVksU1qQ yl8OiHmC2bLPPanDpSFid35L/Ksqv1a7rPcp0+rOqBDSOWKycOsdx9H9XATPmWvfEL74 c51NfqNvn4Z66M0/CvKnkbzK2I/7llpTejFRkoSaj+TQtn5N6ABJpJmyZ04M+QWUnTle Uypee+oL8uQ6dWOHKNduIe8WifoNnqA2pOOv03HDq+Dw3z+fLOWRA1XoQfnLfii0ntaO 9qiA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p5si16197549iop.30.2021.08.31.04.31.48; Tue, 31 Aug 2021 04:32:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241493AbhHaLax (ORCPT + 99 others); Tue, 31 Aug 2021 07:30:53 -0400 Received: from mga07.intel.com ([134.134.136.100]:37710 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239842AbhHaLaw (ORCPT ); Tue, 31 Aug 2021 07:30:52 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10092"; a="282167002" X-IronPort-AV: E=Sophos;i="5.84,366,1620716400"; d="scan'208";a="282167002" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2021 04:29:56 -0700 X-IronPort-AV: E=Sophos;i="5.84,366,1620716400"; d="scan'208";a="540970405" Received: from cfitzp2-mobl2.ger.corp.intel.com (HELO tursulin-mobl2.home) ([10.213.255.231]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2021 04:29:54 -0700 From: Tvrtko Ursulin To: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, Tvrtko Ursulin , Eero Tamminen , Lu Baolu Subject: [PATCH] iommu/vt-d: Do not falsely log intel_iommu is unsupported kernel option Date: Tue, 31 Aug 2021 12:29:47 +0100 Message-Id: <20210831112947.310080-1-tvrtko.ursulin@linux.intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tvrtko Ursulin Handling of intel_iommu kernel command line option should return "true" to indicate option is valid and so avoid logging it as unknown by the core parsing code. Also log unknown sub-options at the notice level to let user know of potential typos or similar. Signed-off-by: Tvrtko Ursulin Reported-by: Eero Tamminen Cc: Lu Baolu --- drivers/iommu/intel/iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 327f477a8553..41d163e275b2 100644 --- a/drivers/iommu/intel/iommu.c +++ b/drivers/iommu/intel/iommu.c @@ -463,13 +463,15 @@ static int __init intel_iommu_setup(char *str) } else if (!strncmp(str, "tboot_noforce", 13)) { pr_info("Intel-IOMMU: not forcing on after tboot. This could expose security risk for tboot\n"); intel_iommu_tboot_noforce = 1; + } else { + pr_notice("Unknown option - '%s'\n", str); } str += strcspn(str, ","); while (*str == ',') str++; } - return 0; + return 1; } __setup("intel_iommu=", intel_iommu_setup); -- 2.30.2