Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp174830pxb; Thu, 12 Nov 2020 00:15:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvwwa9KFRYoRnTC8xh2EYmI5foEQfj6RUyISSzHPv8YBSsC09uerrI/oRBa/QnZACXg/mQ X-Received: by 2002:a17:906:2f87:: with SMTP id w7mr30500123eji.83.1605168937189; Thu, 12 Nov 2020 00:15:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605168937; cv=none; d=google.com; s=arc-20160816; b=ueLhRsUYMkeN06GZPI8lmjHrXWdTccyAb0k1x2QfK7CnLdQrIMUqQVKXKHCMX5mguo cGVYRytbOHZA1wsFkfqLCheS5UorwFsguGIaJZWc3RagQ5v1gZhDu7R78a07k+L7Y/6E 2F5goWLcTwahvKlG2M9/frBA2MPDd4jtyDlPL+KlU3JTQze7LV9iFcdvA86VmZyFIXeT Nj2NuU0f/KFSxwImdeaS9EMMfu6L4LmqABEro7NnK1dq661TSuQiDsTPeq9lUWiPQZMe nsbuoUfMSF31cOeT7FK6gln6o5A2ZZ1R8rzwGSRqPDk+5dY/nYdkkRH3I6yJOft8q5wv DDDQ== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:ironport-sdr:ironport-sdr; bh=FQPrr6eOTN6w44JZC5t6ttFvZs+p+9/TmlW+SjXSjuk=; b=CzsYJpI+FWquzHVq863q35M5clfoC3WklEc2jINp3glykDmiCn4Empuii/Hdb434fn NcTxjHy0aAR3yzw+n0LdO0orcMDUC0C0dMQ5SICzId9jYr7sKHZhNczfLJPW1q0nOVgq D4j2QPcR3jSNF6dLLApA/quAyNiwgJRiATAfpd/0eaF8E+nY67xCPPMcTsySQqqSkUn+ zTT0urBQ1QBB+K6s/8bhiREghfcqkpGNKon8tjaDoWf/VqpJrFKNLuIXvU6LaG0+kYx1 uxmCzRjKNKF8mQ/T6A7w5VmvR9aq4ZTYx134pI3w4V6BNS+d3jbXPbgv5W5RZgISAuhC xBxQ== 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 p23si4052379edw.241.2020.11.12.00.15.13; Thu, 12 Nov 2020 00:15:37 -0800 (PST) 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 S1727010AbgKLINO (ORCPT + 99 others); Thu, 12 Nov 2020 03:13:14 -0500 Received: from mga02.intel.com ([134.134.136.20]:51438 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbgKLINN (ORCPT ); Thu, 12 Nov 2020 03:13:13 -0500 IronPort-SDR: wtZvxZ3rihJihuxlz0iAxmh62HJk0ILOAIn531bIpu+/UU2JFtoA3LzHyNvLLMfizZGdTqacZS q997/apB9Ohg== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="157292028" X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="157292028" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 00:13:12 -0800 IronPort-SDR: auzE3zXNjb4nbrvoPOgodklDPlWISs6bE+3e/oxck2ZR6mnWbiyMT886fkwAgH3KDZQgc7L7t0 gSmYV2lX8M+w== X-IronPort-AV: E=Sophos;i="5.77,471,1596524400"; d="scan'208";a="542165910" Received: from kszypryt-mobl1.ger.corp.intel.com (HELO lhawrylk-desk.ger.corp.intel.com) ([10.213.18.217]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 00:13:09 -0800 Message-ID: Subject: Re: [PATCH v2] iommu/vt-d: avoid unnecessory panic if iommu init fail in tboot system From: Lukasz Hawrylko To: Zhenzhong Duan , linux-kernel@vger.kernel.org Cc: ning.sun@intel.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, dwmw2@infradead.org, baolu.lu@linux.intel.com, joro@8bytes.org, iommu@lists.linux-foundation.org, tboot-devel@lists.sourceforge.net Date: Thu, 12 Nov 2020 09:13:06 +0100 In-Reply-To: <20201110071908.3133-1-zhenzhong.duan@gmail.com> References: <20201110071908.3133-1-zhenzhong.duan@gmail.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-11-10 at 15:19 +0800, Zhenzhong Duan wrote: > "intel_iommu=off" command line is used to disable iommu but iommu is force > enabled in a tboot system for security reason. > > However for better performance on high speed network device, a new option > "intel_iommu=tboot_noforce" is introduced to disable the force on. > > By default kernel should panic if iommu init fail in tboot for security > reason, but it's unnecessory if we use "intel_iommu=tboot_noforce,off". > > Fix the code setting force_on and move intel_iommu_tboot_noforce > from tboot code to intel iommu code. > > Fixes: 7304e8f28bb2 ("iommu/vt-d: Correctly disable Intel IOMMU force on") > Signed-off-by: Zhenzhong Duan > --- > v2: move ckeck of intel_iommu_tboot_noforce into iommu code per Baolu. > Tested-by: Lukasz Hawrylko