Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11564016rwl; Tue, 3 Jan 2023 00:55:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXsm17OJKw7CgaL3dRj6mIZaju/J745kD8mGqQeS38+njuZcKTptpAQTliO5WlBblVIurHhL X-Received: by 2002:a17:907:80ca:b0:7c1:540c:e214 with SMTP id io10-20020a17090780ca00b007c1540ce214mr38723867ejc.47.1672736142682; Tue, 03 Jan 2023 00:55:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672736142; cv=none; d=google.com; s=arc-20160816; b=FNR2y6f06BigMXgbmF6v/IsCDtHIE30eXdjqTbkM9nwHvr/LGPJL6Y3LYs8JxofBM1 5xCGtnzFRhgnoNtoW3Mbyxfd9wYH0+7ZqgKnBfJfOvF6ga8Q3OWVEdMtJg94MiOVnH08 Url7iS2dOUp6vm55X0p4UygLcF4A5CzJYJq7Uv1a0nPzYT5boIuzimewi9zS/kanZBHz rI3/3WJtcSxoE8jTNvaT7XdHz9lSvvDEUU5fwHWRLc3tYceyGbKQnaXE0SzYdMBMKiY4 CfjR4XBe2seqOPmJM+WD3x7nMf+3t8ABsxHDTTnuhBAH+pO1SkuXSKFUcg+i3VINdlIu JnOA== 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=wXuWJ1ZhROiJdd9dLe67xuHBPR+x9IHA5cZ8S2sbf2s=; b=DqNvEkxcH8m4DApaLPHNH6nZeGRXUglwVojrO7RwVwBZiMW2inMe0p2PhbxX0Xrhvw NVx8tSMy8gEAcGbj1Bq3szPRTBwS62vG2lgjLtvceGEhki4FGw1imJehEg/pkIaufA9U rs90kfgc0tgOV2lh0yeLSkzgM0b8g5KF3DwYmUAB+jVMqz/B400myGbkuBPhB6bIZkkE sVW2drNSnziIDq+jUhb02Qd3BMkLNEvPXDPxyEsOwewkRKtdAHaWamZ72oanRJwoBdQ2 ZIl4MkT2IPjNHLwTlfndPwSez9Lns3Pytmm0cFoW+zR1a85odK1E4lW3UK2JMZY7vqHl 0O8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IEwEQTC7; 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 jg32-20020a170907972000b007b9eeb4879asi27780478ejc.419.2023.01.03.00.55.09; Tue, 03 Jan 2023 00:55:42 -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=IEwEQTC7; 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 S237031AbjACI1H (ORCPT + 61 others); Tue, 3 Jan 2023 03:27:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230211AbjACI1G (ORCPT ); Tue, 3 Jan 2023 03:27:06 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CA8EDF87; Tue, 3 Jan 2023 00:27:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672734425; x=1704270425; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=5beijWPU1uPpW8czZDjIwlVtrcesTLaWCl4YOM+jLzw=; b=IEwEQTC7arDaWA5x0kJMJ95s4YHWpIRNZljA0aq2sjxCzfscuM0Hr6Yg gYjV4oelWyMyZksYdZPrx7h+Krltgp3UyXuSfgKJ7GJAR6fyT4cXUjgQd xoQEWsIUnOQqfR3GswyLTvMXxIggrGYR640PPOZTuwDM36Xg/2cTyarkC dVubaAziBVPjg/VkY4zSS4bKYN8DrInF3dwd3rvmw0QK6A/xoYd54BY6p DtNAF2zaDKKp73B3EwjKv2hk88pGvcpkYzwPaUra4i77W+zvupOkosubq ZkrLEwnOszJfdhI1bgGdjixzNlhqKST4o8RSYCx1/U4zhsxXZTYz9DQOh g==; X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="407868363" X-IronPort-AV: E=Sophos;i="5.96,296,1665471600"; d="scan'208";a="407868363" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2023 00:27:05 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10578"; a="983494958" X-IronPort-AV: E=Sophos;i="5.96,296,1665471600"; d="scan'208";a="983494958" Received: from leiwang7-mobl.ccr.corp.intel.com (HELO [10.254.213.238]) ([10.254.213.238]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jan 2023 00:27:03 -0800 Message-ID: <44e77307-8c49-e350-49e4-d5fa3261db27@intel.com> Date: Tue, 3 Jan 2023 16:26:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.6.1 Subject: Re: [PATCH v10 000/108] KVM TDX basic feature support Content-Language: en-US To: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , David Matlack References: From: "Wang, Lei" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 10/30/2022 2:22 PM, isaku.yamahata@intel.com wrote: > ** Detecting the TDX module readiness. > TDX host patch series implements the detection of the TDX module availability > and its initialization so that KVM can use it. Also it manages Host KeyID > (HKID) assigned to guest TD. > The assumed APIs the TDX host patch series provides are > - int seamrr_enabled() > Check if required cpu feature (SEAM mode) is available. This only check CPU > feature availability. At this point, the TDX module may not be ready for KVM > to use. > - int init_tdx(void); > Initialization of TDX module so that the TDX module is ready for KVM to use. > - const struct tdsysinfo_struct *tdx_get_sysinfo(void); > Return the system wide information about the TDX module. NULL if the TDX > isn't initialized. > - u32 tdx_get_global_keyid(void); > Return global key id that is used for the TDX module itself. > - int tdx_keyid_alloc(void); > Allocate HKID for guest TD. > - void tdx_keyid_free(int keyid); > Free HKID for guest TD. tdx_enable() is introduced by TDX host patch series and used in patch 5, should it be added to this list too?