Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5063440rwb; Mon, 21 Nov 2022 16:11:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf4iqC2Vkii4uxol94thGuTBnuRds7c8rRC/7BOaK5HLjNM6IPMzcbl5imYJsyOqfQuLPR3/ X-Received: by 2002:a17:90b:394d:b0:212:b4a9:889f with SMTP id oe13-20020a17090b394d00b00212b4a9889fmr21025995pjb.12.1669075912471; Mon, 21 Nov 2022 16:11:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669075912; cv=none; d=google.com; s=arc-20160816; b=fl7p+hnHicC9qFcKqCLDb+vjFaATiDCtAbYbaxq0PrvGoQ+4hCdLqWAnd4lA8UPVf2 DRkhTV4mwi8KMcVjcpm+GYwm1n9TrfkTNleoqTYCKlR7rFEwR4E9q5LY9TMh68FI83fj C9yemcC2shAByUzxCXiAwHCg8MW0ZNIJi97Dul3gz7ibiWuMAFPDtawXvNVDUUfVfIFP rQZ5reagiIvzd2QC9Mp5ZRnnlG4ELEIBpVl9jxNIvpDeiwzyVtZEgCgsfBy6NszagwpL zeSyzIn1ffGVISsDGRPclR93MGJhfhLTy3mQZLxtLP2yaC97xd35A6M0lPvZjXz9iAam H1NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=Z3PzjZRK8/hUDTMGP07rZigv6N9vP+DNRCqgtWRCYY0=; b=ORdKY0sfHad9UinsOYtrupc0/JUnZik1Se8cZhjiVfq7VK2cYIRMnRblT4r6cx/bWt +UHs7YNJyJwPlgvLXWRLjTX4c/WKozD/4C8k8VT4S/zDrYh87TQA12IYMbXG3on52Q86 DfA0na6jeuK8PfPSKwV8lIdfO6hmxImd07YlZdasXAVli8iHosdKvGpHoOD5Uxvkkd3c nAnXjeQ56Wb0w1ZTaiR5gWzQqiHO0+Eh15ogRE1cCE51k6hlUZyfR7U2KuskBF7v916v wlhyn8NEx2WPpUfikn6E/p+OQdHKpS13FeCd0I1rs0MkRMjHP8AopONShQK/VxSs2mk4 JQfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iGsIpxgS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a656945000000b00476bfca38b0si13529108pgq.71.2022.11.21.16.11.40; Mon, 21 Nov 2022 16:11:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=iGsIpxgS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229618AbiKUX63 (ORCPT + 92 others); Mon, 21 Nov 2022 18:58:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232128AbiKUX5x (ORCPT ); Mon, 21 Nov 2022 18:57:53 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFC6D554F2; Mon, 21 Nov 2022 15:57:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669075069; x=1700611069; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ttMStxsbDlpMEs1D2wUgm8OuQh/Ime21MOFXRosoXV4=; b=iGsIpxgSk69LxRvCs7aQJbg+brvTXpv4/eAVI1egitYvyCeZRTOQU/8/ nB61p/R6GQ7zbvVP1KhsMjSn9yyOfiAhl+pUYCj9e7EpUNJkam2KdSBnZ uMN92IGt9xI0UfXWfSOO28ZtvdP2IwupKKUhh26orqJ0AW1JfoXlgZuT/ sDve7nht8lz3qTo1AwznK2x6XY7iahz85uaMqyJRiZhglnnJIlHhWb+hZ szSXM/CFWYtGqMLMCcBoyYD+nd8pLpRGuO+q5DXgRxrWESxf6P/2Nrfek ZioCmdgxRHffmrUzALdOQ0VcfgZnPu30x+T2WwwtmhlvXWuDoRec9RZe7 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="301237765" X-IronPort-AV: E=Sophos;i="5.96,182,1665471600"; d="scan'208";a="301237765" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 15:57:49 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="730201151" X-IronPort-AV: E=Sophos;i="5.96,182,1665471600"; d="scan'208";a="730201151" Received: from dylanhol-mobl.amr.corp.intel.com (HELO [10.212.242.103]) ([10.212.242.103]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 15:57:47 -0800 Message-ID: <42bb1385-0c7f-6a87-43bb-ea4b12c48427@linux.intel.com> Date: Mon, 21 Nov 2022 15:57:45 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.4.2 Subject: Re: [PATCH v7 02/20] x86/virt/tdx: Detect TDX during kernel boot Content-Language: en-US To: "Huang, Kai" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: "Hansen, Dave" , "Luck, Tony" , "bagasdotme@gmail.com" , "ak@linux.intel.com" , "Wysocki, Rafael J" , "kirill.shutemov@linux.intel.com" , "Christopherson,, Sean" , "Chatre, Reinette" , "pbonzini@redhat.com" , "linux-mm@kvack.org" , "Yamahata, Isaku" , "peterz@infradead.org" , "Shahar, Sagi" , "imammedo@redhat.com" , "Gao, Chao" , "Brown, Len" , "Huang, Ying" , "Williams, Dan J" References: <3e4644e4-d939-7f15-02e1-a6be1ed7f932@linux.intel.com> <827adb3d1610f43ce71b1491db8c680dbe095035.camel@intel.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: <827adb3d1610f43ce71b1491db8c680dbe095035.camel@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/21/22 1:37 AM, Huang, Kai wrote: >> Also why is this global variable? At least in this patch, there seems to >> be no use case. > Platform_tdx_enabled() uses tdx_keyid_num to determine whether TDX is enabled by > BIOS. > > Also, in the changlog I can add "both initializing the TDX module and creating > TDX guest will need to use TDX private KeyID". > > But I also have a comment saying something similar around ... > I am asking about the tdx_keyid_start. It mainly used in detect_tdx(). Maybe you declared it as global as a preparation for next patches. But it is not explained in change log. -- Sathyanarayanan Kuppuswamy Linux Kernel Developer