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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BD51C433F5 for ; Tue, 29 Mar 2022 23:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240490AbiC2XaM (ORCPT ); Tue, 29 Mar 2022 19:30:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbiC2XaK (ORCPT ); Tue, 29 Mar 2022 19:30:10 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAC05F39; Tue, 29 Mar 2022 16:28:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648596505; x=1680132505; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=gzmBCGI/MQMl41/e4XEdKaqxJlbBNFcUeD2Jf3KlOBU=; b=C/1FVXQZkriNjtU139F7egvtv32Kn606nZ43ERfLSPyOQmIGqPh2yz9i Hkm56Dnnzjtk01CoGdkgsqzWhpwL3551WfCiCjWU+m61oNdCVtS4BkxWV 2fUtPW++tUZjxCuLxhgju5ybhQ2RZ0dKcOapTaDeopHn7Kudv28Tdc6Hk xRMa6SY2cLzazMZg6Q56sBzWZO0rlWy3mmtSPha64bBhRqQm7Pi95oJ+y 4zKilNVoY4V0m92DN3FpiBN8XNgAWUFFeM4q4FHIjKKIGJsgTYbrRCOg1 kMQgia38ZPYjUn4DOfgiG2smd8PX2+B4jTb7rQFoXZ2eJQGD++nS1JKLk Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10301"; a="345835729" X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="345835729" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 16:28:20 -0700 X-IronPort-AV: E=Sophos;i="5.90,220,1643702400"; d="scan'208";a="585783066" Received: from jaleon-mobl1.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.255.95.100]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2022 16:28:17 -0700 Message-ID: Subject: Re: [PATCH v2 01/21] x86/virt/tdx: Detect SEAM From: Kai Huang To: Isaku Yamahata , "Tian, Kevin" Cc: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "Hansen, Dave" , "Christopherson,, Sean" , "pbonzini@redhat.com" , "kirill.shutemov@linux.intel.com" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "peterz@infradead.org" , "Luck, Tony" , "ak@linux.intel.com" , "Williams, Dan J" , "Yamahata, Isaku" Date: Wed, 30 Mar 2022 12:28:14 +1300 In-Reply-To: <20220329175234.GA1915371@ls.amr.corp.intel.com> References: <51982ec477e43c686c5c64731715fee528750d85.camel@intel.com> <20220329175234.GA1915371@ls.amr.corp.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2022-03-29 at 10:52 -0700, Isaku Yamahata wrote: > On Mon, Mar 28, 2022 at 08:10:47AM +0000, > "Tian, Kevin" wrote: > > > > From: Huang, Kai > > > Sent: Monday, March 28, 2022 11:55 AM > > > > > > SEAMRR and TDX KeyIDs are configured by BIOS and they are static during > > > machine's runtime. On the other hand, TDX module can be updated and > > > reinitialized at runtime (not supported in this series but will be supported in > > > the future). Theoretically, even P-SEAMLDR can be updated at runtime > > > (although > > > I think unlikely to be supported in Linux). Therefore I think detecting > > > SEAMRR > > > and TDX KeyIDs at boot fits better. > > > > If those info are static it's perfectly fine to detect them until they are > > required... and following are not solid cases (e.g. just exposing SEAM > > alone doesn't tell the availability of TDX) but let's also hear the opinions > > from others. > > One use case is cloud use case. If TDX module is initialized dynamically at > runtime, cloud management system wants to know if the physical machine is > capable of TDX in addition to if TDX module is initialized. Also how many TDs > can be run on the machine even when TDX module is not initialized yet. The > management system will schedule TDs based on those information. Thanks Isaku. I'll keep current way for now. -- Thanks, -Kai