Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1378596rwd; Thu, 8 Jun 2023 17:30:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7rdEgcIpm1A0oHTXYz82JVg0+DZl8gWBOIuhx4Wx6rDTaP+2sfaJVipcOYYe2EO8Y/mG3/ X-Received: by 2002:a92:dc0b:0:b0:33a:adaa:d6d1 with SMTP id t11-20020a92dc0b000000b0033aadaad6d1mr203514iln.15.1686270626196; Thu, 08 Jun 2023 17:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686270626; cv=none; d=google.com; s=arc-20160816; b=c9hHeP55QwwozY64tXNaxtFa4D1lgX9LqT6OWj0oeopmPsDwmXeIwKLUDtfFK04xz+ o1UMtu9vIYrz2alLRmzkRAWeVVufLdF9oYzwMEDWtYdxF6eOmWw6e0url4VEDGVzdWVD WsMQ5aA/3kFE7VAFvi8VpHu7INju3gHLuBwVqULhmQEg40RNWFqNxKWrKr/SmmO/I6+y nIBW7wopl7M6pWVPO3dRwB5QUEbs3AmRL3zIo649JqfWLTzFxbXQXQF1Rcbi8vWX56KE m/yA8J/xkzl5LismJ1EwFNcWD36LJPmyKyMNxVTP55/8uSnS5yXBlpYWnHf+b/+JFkAb 8v0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=5paVMNYd7s6sQAM/7nLRV5/2r89Zq2TUL5SG+0bDT2Y=; b=vu7AdwARJ+NGQhEBXCUinRVbsJYHWYUVLUaXA5Vl9RgTIXO+EsTSusBLob27x8u3tf daZ3NSiKb7lY1Gz3dQKzzACq8GQwOqVBDg4Wptj2+6uTiSzV3WbNJdAEgZCnJ+VExd5i QSRFKw0Q2N9Sx5QAc6+f9JoffWkraCh50fBMDTah8/NMe33wAjsCcRxiYtkCSjr7L+9Z t30MvoILHOGL6jFaZJIua0c/gmJ9ZXqeYeKtChLUl+BYLeCmHgnERWSSK6co6qdq8rja FL8NjwvItSruqYNAseWe++MA8XAeZVmPPMS9zcCK60P8uP3qq6bFdqv2DCrir/Cqnqlr PqlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HYZzsBHG; 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 np17-20020a17090b4c5100b002475bc0a186si3500242pjb.69.2023.06.08.17.30.12; Thu, 08 Jun 2023 17:30:26 -0700 (PDT) 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=HYZzsBHG; 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 S237153AbjFHXxz (ORCPT + 99 others); Thu, 8 Jun 2023 19:53:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234816AbjFHXxw (ORCPT ); Thu, 8 Jun 2023 19:53:52 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CCC12737; Thu, 8 Jun 2023 16:53:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686268430; x=1717804430; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=iLSjboJdek0X7Qc1YWntBo1izZe2j1frjQXUOyLlElY=; b=HYZzsBHGV2KfOJXYAnLxmzl6UzxpcpAnDIGL8DR+onPPc2AtD2X9lOvZ ay48MN88vCYBBaBFVwVubhLNjv0ROfkFoOQHcTPPw2BuZdp+4YwWitHUz sYcU2XUK7DAGyKGQkEGdt0kVmSSDRnEibhGV3T61bi/uQQxRqTHGju4uc HSymS/Npdg8ZlX9nJJhkqcdIu+3uhRm3dWA4peM3asqrFmEI85bG3iNsl mPl8FSGPFlOkSk/GjxmglOF6p7mv/v/YF7EATtosXDmGUQqbFJWoQbxJ0 4X4jbg6YvPc2I/3tu2R94bsseVcyTWvXDnrdMgicf0RLiS7HVbUMQzVfn g==; X-IronPort-AV: E=McAfee;i="6600,9927,10735"; a="357471052" X-IronPort-AV: E=Sophos;i="6.00,228,1681196400"; d="scan'208";a="357471052" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 16:53:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10735"; a="834402245" X-IronPort-AV: E=Sophos;i="6.00,228,1681196400"; d="scan'208";a="834402245" Received: from fgorter-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.59.89]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 16:53:44 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id B3B18104C0F; Fri, 9 Jun 2023 02:53:41 +0300 (+03) Date: Fri, 9 Jun 2023 02:53:41 +0300 From: kirill.shutemov@linux.intel.com To: Kai Huang Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, dave.hansen@intel.com, tony.luck@intel.com, peterz@infradead.org, tglx@linutronix.de, seanjc@google.com, pbonzini@redhat.com, david@redhat.com, dan.j.williams@intel.com, rafael.j.wysocki@intel.com, ying.huang@intel.com, reinette.chatre@intel.com, len.brown@intel.com, ak@linux.intel.com, isaku.yamahata@intel.com, chao.gao@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, bagasdotme@gmail.com, sagis@google.com, imammedo@redhat.com Subject: Re: [PATCH v11 14/20] x86/virt/tdx: Configure TDX module with the TDMRs and global KeyID Message-ID: <20230608235341.7zr2dazup7p7mjd7@box.shutemov.name> References: <4e6cd933edd2501147366df7a17e1087560a4320.1685887183.git.kai.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4e6cd933edd2501147366df7a17e1087560a4320.1685887183.git.kai.huang@intel.com> X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Mon, Jun 05, 2023 at 02:27:27AM +1200, Kai Huang wrote: > The TDX module uses a private KeyID as the "global KeyID" for mapping > things like the PAMT and other TDX metadata. This KeyID has already > been reserved when detecting TDX during the kernel early boot. > > After the list of "TD Memory Regions" (TDMRs) has been constructed to > cover all TDX-usable memory regions, the next step is to pass them to > the TDX module together with the global KeyID. > > Signed-off-by: Kai Huang > Reviewed-by: Isaku Yamahata Reviewed-by: Kirill A. Shutemov -- Kiryl Shutsemau / Kirill A. Shutemov