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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60647C433F5 for ; Thu, 19 May 2022 11:55:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BB4FF6B0072; Thu, 19 May 2022 07:55:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B3CFB6B0073; Thu, 19 May 2022 07:55:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A06516B0074; Thu, 19 May 2022 07:55:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 8F21C6B0072 for ; Thu, 19 May 2022 07:55:41 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 5A57F60D1F for ; Thu, 19 May 2022 11:55:41 +0000 (UTC) X-FDA: 79482338082.26.08BBE28 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by imf09.hostedemail.com (Postfix) with ESMTP id C4463140060 for ; Thu, 19 May 2022 11:55:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652961338; x=1684497338; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=t8Pe4Q+TJHqdH7A97sboo3Z2TolIf8EzWhjhwNv7dsg=; b=WrNyuOWDlVqhw5PJmZBRkwQj2mv8o6Rg5uGk+JyS5O0SJo1yb7H5eRTa ZP6MG6ZS3DKNPJcHVP/GaBCEqqYiL6p8AgCfrlNONZEbc7aYhldhAY15x XDJsjGb43KAaLosBVajhi1mM8BJu1LwvYdNna7impWLSrCT+gqBV9h4ax JvOJ3KeS1LlslIje+YJkN+wYQ5BBQLvAD5PCkYqYBP2zwY00dmEc5aRRE aBp1vGMjVX6bjrood5YCM93pD/u6TQsdZ9R+53N1qUTplH6/bdbGlW7d5 GzJ4X/HBG/Vd1+r0aE4HrGlQ8T9hie5UPuzQdDlzi1j7u//2Sli8KgPrc Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10351"; a="272294578" X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="272294578" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 May 2022 04:55:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="556863492" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 19 May 2022 04:55:27 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id E88F0109; Thu, 19 May 2022 14:55:27 +0300 (EEST) Date: Thu, 19 May 2022 14:55:27 +0300 From: "Kirill A. Shutemov" To: "Gupta, Pankaj" Cc: Borislav Petkov , Andy Lutomirski , Sean Christopherson , Andrew Morton , Joerg Roedel , Ard Biesheuvel , Andi Kleen , Kuppuswamy Sathyanarayanan , David Rientjes , Vlastimil Babka , Tom Lendacky , Thomas Gleixner , Peter Zijlstra , Paolo Bonzini , Ingo Molnar , Varad Gautam , Dario Faggioli , Dave Hansen , Mike Rapoport , David Hildenbrand , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, x86@kernel.org, linux-mm@kvack.org, linux-coco@lists.linux.dev, linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org, Mike Rapoport Subject: Re: [PATCHv6 02/15] mm: Add support for unaccepted memory Message-ID: <20220519115527.jqzrvsqk4o225m6d@black.fi.intel.com> References: <20220517153444.11195-1-kirill.shutemov@linux.intel.com> <20220517153444.11195-3-kirill.shutemov@linux.intel.com> <972b5335-98df-f7b2-4b4f-53695e684d8b@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <972b5335-98df-f7b2-4b4f-53695e684d8b@amd.com> Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=WrNyuOWD; spf=none (imf09.hostedemail.com: domain of kirill.shutemov@linux.intel.com has no SPF policy when checking 192.55.52.115) smtp.mailfrom=kirill.shutemov@linux.intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: C4463140060 X-Stat-Signature: 9fdm73fsag53975hn6rp8exsdtm38rsg X-HE-Tag: 1652961327-584262 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, May 19, 2022 at 12:43:15PM +0200, Gupta, Pankaj wrote: > If both Intel TDX and AMD SEV-SNP requires the memory to be accepted before > it can be used by the guest. In what other use cases (apart from memory > hotplug), the lazy memory acceptance will be useful? It is nothing to do with hotplug. Any memory has to be accepted before it can be used inside the TDX or SEV-SNP guest. It can happen upfront, before kernel gets control (like by firmware) or by kernel. The idea is to accept small portion of the memory upfront and leave the rest to the kernel. The reason why delaying acceptance make sense is boot time. We want the guest to start doing useful stuff as fast as possible. -- Kirill A. Shutemov