Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4098545pxb; Tue, 10 Nov 2020 07:56:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmT5WxkpinlajpHFDfALyCe9DE5h/0xh3kr+OJAZeE8g7AF4/Nv27YaEREaqAZiqdpJYKg X-Received: by 2002:aa7:cad6:: with SMTP id l22mr21792875edt.229.1605023785792; Tue, 10 Nov 2020 07:56:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605023785; cv=none; d=google.com; s=arc-20160816; b=amFTaWTReEkuYIwCrobbfMm5HYXTslJX1X0zQtS91NB6MN7L2sqn15hg+hicG9+Rht N/ZXVHRjp37yHJ94PCY4mmCIAgPADM+weV/24Ke2R4UZkmyqMKyEH58Jlfrw845dCaWP dEYH7pGvnQWUqteDGUoYQL8Hq3aWCz9KEvqP72griFL9Qqv3uajOteSusoVtizEBkNHZ 78pfC1ETMTFUn+6O7B61wRbksjXDHgZwKyAEffSsvq85B3LRvPxIEYK0y8HON07/bWYI C1rcCu+nEcn6O+vNrbxOfqdVEJijWF52ESqnfqhzP7YECyKr55n/+Pt1Ko4CrL2j8HeL ft0Q== 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=XT85nbi+o7KivfWniMGRHln6O+vlOTxrHHXwt8jsvno=; b=gf22uosZVo3l4XY6B1s+g6hvQ82GkDTDwBAAH53YcRsk+TOufASexpT2OwhCj4rQPb I1xUZMM8yLjJ9tSXZqO6FEIq/u6tHIv+UCuO7CO9Rp4pY41+5/ojsNhUL4LYu88WlSnp zvn2nR/XmS7gLBPtLaVPTHSwzKQmogI7hldAFBTEbVSyMH3AO0PEbDx/lBI597dNXGc8 ilDr9U1WIJIadKgLNnC5n72wTDOqEICggHm4wk5WBXrQ5aQcaUuFPJ3Q9RrR4sK77hda K/MPMW0t8j3600teSzH9OfhqRDPHVtSyFbO1eVixy0/C1R64HB91CETxei5GTdn3wXmE XMJA== 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 g14si9464750edp.246.2020.11.10.07.56.03; Tue, 10 Nov 2020 07:56:25 -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 S1730760AbgKJPxn (ORCPT + 99 others); Tue, 10 Nov 2020 10:53:43 -0500 Received: from mga05.intel.com ([192.55.52.43]:24820 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730299AbgKJPxm (ORCPT ); Tue, 10 Nov 2020 10:53:42 -0500 IronPort-SDR: oCt6siBiOfnWUs1mn3I/HmUnETys2XhtxGkDYnMj/8edsObVmSRkl0Zqt5McnMK1g8eFSTE828 6H0VOGaeZFIw== X-IronPort-AV: E=McAfee;i="6000,8403,9801"; a="254707256" X-IronPort-AV: E=Sophos;i="5.77,466,1596524400"; d="scan'208";a="254707256" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2020 07:53:39 -0800 IronPort-SDR: dracVvCiK/bgswNxiYrBwOdkO98TtU2a9F4PJqB57gXg+uh8aL8UQ7fpvgZZrxzyGa//lle4MV SxRan/iDmzHg== X-IronPort-AV: E=Sophos;i="5.77,466,1596524400"; d="scan'208";a="531272516" Received: from lhawrylk-desk.ger.corp.intel.com ([10.213.18.46]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Nov 2020 07:53:36 -0800 Message-ID: <4cfa1f1827e0ccbfbc94de3beba64a4a141b2248.camel@linux.intel.com> 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: Tue, 10 Nov 2020 16:53:33 +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 Hi Zhenzhong 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. I have check it on my TXT testing environment with latest TBOOT, everything works as expected. Thanks, Lukasz