Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp617740rdf; Tue, 21 Nov 2023 11:16:39 -0800 (PST) X-Google-Smtp-Source: AGHT+IF0ywEGCMMk1s97BwqHv2ZB5iU4A4OuMu0cAzK0oxOs+GcGY0Loicfzm0Tr8z2syaJsju2G X-Received: by 2002:a17:902:e842:b0:1cf:6945:7573 with SMTP id t2-20020a170902e84200b001cf69457573mr87342plg.29.1700594199120; Tue, 21 Nov 2023 11:16:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700594199; cv=none; d=google.com; s=arc-20160816; b=kfIub31B6UkRD4UrctWZKioeEbrYdbTxmLlM7+4cIcq38I1DhVa3lEuDhoo4Ekw/nQ kUlb4/UrwqY50+RG1QEltHc147p1mFPYdGeEiYEDvYrhV47UbVpE0YUl55bbIQCXggv8 IyEeBDpSE5Dj8GyIgwwiuOhMVLz4cjwYp2j2AAFa5jRCJ62MhmRpNV5BV0B/nFMNqLZp HE7JokxurKho6G13Gv029Oax4TiItAv1KTotuJJN7wfHH/KNkfAE5UwJd8sYn1pMeyWM dL73hNPpm4Mq4CsYMk+1wW0RjDH4OIP3khBJc5RKMCMw+y4Jx+y2BgEJz/2SKF5pNlXn iI1A== 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=qblj+qH3fw+/ByqO1NzP24nDnVk8SZ7eKM+0J96BVGM=; fh=feTiwfuE8or3n3LiFjReDA/mWG/yevLz/4RjYwlNcfA=; b=q5MfKpjydT2JFnxC2DZIYxhl5TFAIJXny3bD74E1RqIUTwyXoM18Mx5uxq7BFyGA64 gb6BxO3ojs6+UViKS5cEivWk9KtmZEViRrF3Bk10oll41aGDBvMrG5tFrhkN37lgtr3Q rwL4HTeBek3is0OC02yZOhw4Lu06m8dBmwsaQgXQWsW8ixSHW2qifhZtP/m9v3M02tni r8IPL6YtJOMhLcF9K445FxwN12HW9jnI6BzNuqh1RuPqfbcMhxnBzsbrSRMl8fKKymQS KgaGoPMbTm7TvRI0JP9iwxqYmpgElHanqPuKq2Mtr/KPPCLFQVBLSX3QRNLG0Aqwspph tg/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Lp9ZT9B5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id b2-20020a170902ed0200b001cc692bf120si10541635pld.61.2023.11.21.11.16.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 11:16:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Lp9ZT9B5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 33FF1802F667; Tue, 21 Nov 2023 11:16:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230527AbjKUTQE (ORCPT + 99 others); Tue, 21 Nov 2023 14:16:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230202AbjKUTQD (ORCPT ); Tue, 21 Nov 2023 14:16:03 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF638110; Tue, 21 Nov 2023 11:15:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700594159; x=1732130159; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=XcNHGE3mfkWpwt/actN7amxrbPAaFnHfr5Q3LoIXsAA=; b=Lp9ZT9B5wsuaWAEVS2DxjZNZQO87aiEVl4+v5557Jn+8ZZG/UIe8u6xW rd13w1tnZnLnNd4UiALWiwORyui2HPiDf0LdWm9sPw9pYHTR47J3aTT15 A2aBtllTZJ2STsMov/qGQ7muGgZNCKLJE9HEjlL4A2DmAtrs+//05j5G4 hyCtlFePg+3oUVvsDTqDuE04RhscXYFxF3vPfVA7tNjPn4lHPZoA4QuXY UfOGXeSSg2R492J/JUyqv5k/Ql22Cig4x+/HbKdrrDbUHv/wK1VjoO2Mb DD+argnhn/Y7H3h6P4Hp8fWajUqfSRx4Q1IQLEE09gLq6vvWcTqTE1xSI g==; X-IronPort-AV: E=McAfee;i="6600,9927,10901"; a="395831982" X-IronPort-AV: E=Sophos;i="6.04,216,1695711600"; d="scan'208";a="395831982" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2023 11:15:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10901"; a="910555576" X-IronPort-AV: E=Sophos;i="6.04,216,1695711600"; d="scan'208";a="910555576" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2023 11:15:58 -0800 Date: Tue, 21 Nov 2023 11:15:57 -0800 From: Isaku Yamahata To: Binbin Wu Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , David Matlack , Kai Huang , Zhi Wang , chen.bo@intel.com, hang.yuan@intel.com, tina.zhang@intel.com, Sean Christopherson , isaku.yamahata@linux.intel.com Subject: Re: [PATCH v17 020/116] KVM: TDX: create/destroy VM structure Message-ID: <20231121191557.GI1109547@ls.amr.corp.intel.com> References: <997a92e4f667b497166ff8cc777ec8025b0f22bc.1699368322.git.isaku.yamahata@intel.com> <2a5a38d9-28e2-4718-b8fc-2b8f27610706@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2a5a38d9-28e2-4718-b8fc-2b8f27610706@linux.intel.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 11:16:36 -0800 (PST) On Sun, Nov 19, 2023 at 02:30:19PM +0800, Binbin Wu wrote: > > +static int tdx_reclaim_page(hpa_t pa) > > +{ > > + int r; > > + > > + r = __tdx_reclaim_page(pa); > > + if (!r) > > + tdx_clear_page(pa); > > + return r; > > +} > > + > > +static void tdx_reclaim_td_page(unsigned long td_page_pa) > > This function is used to reclaim td control sturcture pages like TDCX, > TDVPX, > TDVPR. Should this function name be more specific? > For me, it is a bit confusing. > > Or maybe do "td page" have specific meaning referring to these control > structures > pages in TDX? As they are control page, how about tdx_reclaim_control_page()? -- Isaku Yamahata