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 ED04AC5479D for ; Tue, 10 Jan 2023 01:22:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235499AbjAJBWS (ORCPT ); Mon, 9 Jan 2023 20:22:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235582AbjAJBWN (ORCPT ); Mon, 9 Jan 2023 20:22:13 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7902240C27; Mon, 9 Jan 2023 17:22:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1673313730; x=1704849730; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=4lDBthtxkF9BK72Tb/F4AAov7TFWGXDqWmGMUa8+rYs=; b=JsWcNHSYbs2ma1mrg78d3pWp3Le1Bg7307W0R6DZlmC5ZSANIlPgf1e7 YvPZrVXTQeWHH7KTYngy8LWtVi6NG4XPtzslMrijBWChKfMCHCfkPxkDc r6kYs1lGWVchceJR4S3/rrEazGer8vmyqzEnhg/lScOvfBrrjCzoI3I35 ZVSKOjaK+8ju1ZjkN0sEf799n2Om72hM2VKDtJA6S2fmFaTiEh8WaZKXV aHYMw5rkzJUlCjAZnFhc18ZsGXR7tiJCQzVNLA3wDeNazX1ICyydE/6iB oNTlY2X6G9YAdT+Ui44/RFBMeQHheOPzvUesHL/RVwVB2bVD/Htz587wW A==; X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="303391988" X-IronPort-AV: E=Sophos;i="5.96,313,1665471600"; d="scan'208";a="303391988" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 17:22:10 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10585"; a="902198111" X-IronPort-AV: E=Sophos;i="5.96,313,1665471600"; d="scan'208";a="902198111" Received: from swapnadi-mobl2.amr.corp.intel.com (HELO [10.209.29.117]) ([10.209.29.117]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Jan 2023 17:22:08 -0800 Message-ID: <778a6c80-a955-620d-a82a-c2ca82f26363@intel.com> Date: Mon, 9 Jan 2023 17:22:08 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH v8 11/16] x86/virt/tdx: Designate reserved areas for all TDMRs Content-Language: en-US To: "Huang, Kai" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: "Luck, Tony" , "bagasdotme@gmail.com" , "ak@linux.intel.com" , "Wysocki, Rafael J" , "kirill.shutemov@linux.intel.com" , "Christopherson,, Sean" , "Chatre, Reinette" , "pbonzini@redhat.com" , "tglx@linutronix.de" , "linux-mm@kvack.org" , "Yamahata, Isaku" , "peterz@infradead.org" , "Shahar, Sagi" , "imammedo@redhat.com" , "Gao, Chao" , "Brown, Len" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "Huang, Ying" , "Williams, Dan J" References: <27dcd2781a450b3f77a2aec833de6a3669bc0fb8.1670566861.git.kai.huang@intel.com> <2d7d2824-7aa7-5f96-d79b-b44ff7fe2ef9@intel.com> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/9/23 17:19, Huang, Kai wrote: >> It's probably also worth noting *somewhere* that there's a balance to be >> had between TDMRs and reserved areas. A system that is running out of >> reserved areas in a TDMR could split a TDMR to get more reserved areas. >> A system that has run out of TDMRs could relatively easily coalesce two >> adjacent TDMRs (before the PAMTs are allocated) and use a reserved area >> if there was a gap between them. > We can add above to the changelog of this patch, or the patch 09 ("x86/virt/tdx: > Fill out TDMRs to cover all TDX memory regions"). The latter perhaps is better > since that patch is the first place where the balance of TDMRs and reserved > areas is related. > > What is your suggestion? Just put it close to the code that actually hits the problem so the potential solution is close at hand to whoever hits the problem.