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=-15.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT 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 46700C432BE for ; Tue, 31 Aug 2021 11:30:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2ED6660FE6 for ; Tue, 31 Aug 2021 11:30:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241504AbhHaLay (ORCPT ); Tue, 31 Aug 2021 07:30:54 -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