Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2415650iob; Fri, 20 May 2022 08:54:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzELdX0hzHlCMjRoQqict9V8VPqg9fICVI2Ae42b/VPUDmO0E8Cs/poYRmvr14FWjWlhDs6 X-Received: by 2002:a63:1415:0:b0:3db:b043:6374 with SMTP id u21-20020a631415000000b003dbb0436374mr9187064pgl.473.1653062042919; Fri, 20 May 2022 08:54:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653062042; cv=none; d=google.com; s=arc-20160816; b=ZF1S459vAGDazS8K6tirGHADbmwjZNycALDXapDiokFJJnKQYpxsGPSPBA0fk0ED/Y Azr/bHdzFwEKhEDWIscGyd4t4EcupPKeU+ee2Rd+Qc35oez8rNxHEIWm/P7QtPPwk8Xf St2JpuAIDRnwShiPvvSbn/RaCXW+W+K9QKCuNgtqE1rbIZXW2rW20GxtP++Yy8LgFRfA 9Jt0KFV+24ebfu+UM4jBmSCuTkEvGga7szjtrt0GrkqxQV8sHrR3hJgPNGMo974340nj t+33+Pd6yzFlGqSBVsexDOqB0CLMOTnqnIEhkniYco+jxXB4NyOPA21fKhRNVtnu6JJT P+DA== 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=qK8x8/E3t69/jRRdqCixRM3UYZpYiF4fEk/8swUjF88=; b=MgXZyB9UJh6JV/Jtjgvq9a4j17VfOY7swU6giOylBEx9IBvSbW4zdm/3TBi8N64uhS OMF0s0JsKCj2TXDA8CTpLkKKmETgkObBtTMP6T9YNLs60hkjl5U92+63mZQX/Hm2mGgc 2qmMVPxVq0OxKhg1l8uyNKaBieEYb9+8HIbyzAFRgWjiRwVx2bKHkvMfQPA/7nstJq5N 2l+Am23J1MJs3QZeAHGG76PCcOjnhYGQXefB7HH2v/hneteB9NpKSNNvFKsGNXOn4Mpr pDv6FJ8hsx09vs9FN5OhbLt4V7msstrCbBF3JPLE4NhLhlQD92ptJrn2ccbQKOxq7NKy eUAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="Tj+4p/nO"; 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 cu5-20020a17090afa8500b001d98cc9c20csi2942047pjb.189.2022.05.20.08.53.49; Fri, 20 May 2022 08:54:02 -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="Tj+4p/nO"; 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 S237624AbiESLzn (ORCPT + 99 others); Thu, 19 May 2022 07:55:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237611AbiESLzh (ORCPT ); Thu, 19 May 2022 07:55:37 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAF5BB82FA; Thu, 19 May 2022 04:55:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652961335; x=1684497335; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=t8Pe4Q+TJHqdH7A97sboo3Z2TolIf8EzWhjhwNv7dsg=; b=Tj+4p/nOQpg9L2ypSsevkuzqvs1kG8dIkLkTpdW27YVIXrwDtmmL87Z1 6ASJSKj3dB3HOAMJ+LMRWQYL2ZoVxmw/GDOGmMj5Pz5EEsW11L28fEKpP F21U/0dn8NLlQVs3+I6PjSKgEf4AYWv7qjAhVc2XBfQxVfe0Ji1BCaIqi AHNcnkmc4bvWMHr7Ro6CwOKPH2T80mPYXOD+gQaNR6pdLepL+SCxxF9Su s+JNuseUbcjxnMfm6PgU31BER2lXYLh+PWKWbK3YTyYrrN5tzhSSLvVFh uS/uphX/rUV0xMrTNZvuNd3FiYNug4Aaxix/lWxvlPauImCIAUyTVSkN9 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10351"; a="270988936" X-IronPort-AV: E=Sophos;i="5.91,237,1647327600"; d="scan'208";a="270988936" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.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> X-Spam-Status: No, score=-4.8 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 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