Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1623240iob; Thu, 19 May 2022 10:26:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQvNZ6bn+BgitTZq1C7AyK9Ce9M2nKGoL7x/rvhd3cSaDvLi7LUdtFdJtnx7hwpvtyP8Xe X-Received: by 2002:a17:902:b684:b0:156:80b4:db03 with SMTP id c4-20020a170902b68400b0015680b4db03mr5704617pls.16.1652981197982; Thu, 19 May 2022 10:26:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1652981197; cv=pass; d=google.com; s=arc-20160816; b=CIYkQNCaNNSTS3l9VXFN07pA/+pbWH6ltfD8OSy9GE3EDZqsGFkv6L/z+it7syeDGi eAS4lx2RBFbpxSK4b0hCYCDl/rGn+F1c5Vme2IGmqIro3/4CXoj0hd9L+ljBZq9frQNs 6iGLvZtuR9Ay5ps6FWGJekdYgVVpEh89liEWESzrx3ROx09GbvoFDS8d33vbZbA4q/8l 8tU0x0D4XIEI3Cm5816Gku/0upCxXDaKIgoyI4ysEAtiPQtl7ylQLC+5IkzoZlFC8rYL 1bDYp/FxtZfMU1IxgWwsxROZuq4pc3tJyU7pSjHjYUjePNASXN9sAvKCYwsNxmA0QnTk BCmw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:content-language:references:cc:to:subject:from :user-agent:date:message-id:dkim-signature; bh=6y4xv26s0lvvRrYJGpFGqruDvZsxqpigncY8/eXpMlo=; b=IApEcTx8Frc8lQ8ePdXL6l+6GB+8LYWUfqIyPvpSiWCrwlfypTAusiw4iVzLVsKE0K 15R+bYtl7UTURIYGJ+mQ6lRRlP2XsjQjCDE4vaTJY0mq4gD9VXTCDVn/9n4jWl/iJQF3 XYbnjX/+3st5I+XOtnglEBOfhdTsGgCp6cugTTktGB5cX43aKcYKKJnetfensziftQgI qnG2XShKTkAFe+6T7sYLLZpAfGNwHQQoT+1WMHHd6ybLD+IXNupU5iNgD9cu529224PF 7pUGtgyOe+6/adPHqRFJ8YvH1ZZXbzH3hd1NLZOnwjG5cnV4SnJSDiJ4FaIxj041KUox EUMg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=GKYugmDf; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a635550000000b003db68cb9d71si7004436pgm.407.2022.05.19.10.26.25; Thu, 19 May 2022 10:26:37 -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=@amd.com header.s=selector1 header.b=GKYugmDf; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234200AbiESOdf (ORCPT + 99 others); Thu, 19 May 2022 10:33:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239680AbiESOdb (ORCPT ); Thu, 19 May 2022 10:33:31 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED042BA54F; Thu, 19 May 2022 07:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B5EzFTI9jUcHfs0+vGtYLjboMkLGWygnMDs3rIW00ERTgcgnAxJoDEb/v7KuZCg+JnpC/yOIoG3X7zs4mYkAyUQ7Ut8B6hU0rqljXaiz9UXdMy+X9bWvDmNZsPORvGBZ3S1hcbA6mA4l03WZb02I8ziIDs3oS8eoS8wEc6NLsiRwj5T9jCh6Ni10FwuQgFB4+nGYWsjXlDROzNBZL33G4SYT7TgVm88BYHiAhfrMcU8a4W7XtIPHprDQT+fbEqXsRd8GN71tY1j90qxtHv8KM7Btr0NZ+Z6gB1+bsZDPvXnVXXJwzA5Ay2ucV81sfZjMpxpLlpHOHda3rRzVUJ/8Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6y4xv26s0lvvRrYJGpFGqruDvZsxqpigncY8/eXpMlo=; b=b2FAH56pYewytC8BF4mJdNTtz7c9ZQ1MrCr/kC7nk+msC6P3i+1e8lQ/Y5YYahwqSar7bdeCy4MVftsogPqTv0kvBDRAlPvCZ7ppI65Scjaimsf+arlnSqyINZgczl0oQgj3f8e9IpsDLf2nDnqh3tjr342e2KJo28cyjotP9cmglfmnVZiFO8WvN4PqDaMqfzdkLys5T/9SrfXFQ6c4TBpYu9VZSnZi23c+6kiVJwdD/AuGZ49ehDb2sfQLRmN238nVXc1WNiiHtQCjOsuv4rfCM1mBcd9Owl75DYy/Cd+5M1agHMqrDfajgSURDoZT79wQQmKqhlgLp2sH0y4xog== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6y4xv26s0lvvRrYJGpFGqruDvZsxqpigncY8/eXpMlo=; b=GKYugmDfRkZVwnVAtAWrPa010WPfpCUiIykDjL6GFdoAsr4gKGWXFRrOH2k8sPLT6SFIWZFUDcZ1B8V3QfTPWfKFrDyBIHsGQohA7T8S98KZqAjmJEoh3oBq0YTRHBrg0chd2jAHbIPgUKiBg8FD78Ws0carapRIWCxamrei31E= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CY4PR1201MB0181.namprd12.prod.outlook.com (2603:10b6:910:1f::11) by SJ1PR12MB6195.namprd12.prod.outlook.com (2603:10b6:a03:457::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.14; Thu, 19 May 2022 14:33:28 +0000 Received: from CY4PR1201MB0181.namprd12.prod.outlook.com ([fe80::5c1f:2ec0:4e86:7fad]) by CY4PR1201MB0181.namprd12.prod.outlook.com ([fe80::5c1f:2ec0:4e86:7fad%3]) with mapi id 15.20.5250.018; Thu, 19 May 2022 14:33:27 +0000 Message-ID: <8dfc48f9-80a2-fc3f-4d2a-08abae59548f@amd.com> Date: Thu, 19 May 2022 16:33:15 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 From: "Gupta, Pankaj" Subject: Re: [PATCHv6 02/15] mm: Add support for unaccepted memory To: "Kirill A. Shutemov" 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 References: <20220517153444.11195-1-kirill.shutemov@linux.intel.com> <20220517153444.11195-3-kirill.shutemov@linux.intel.com> <972b5335-98df-f7b2-4b4f-53695e684d8b@amd.com> <20220519115527.jqzrvsqk4o225m6d@black.fi.intel.com> Content-Language: en-US In-Reply-To: <20220519115527.jqzrvsqk4o225m6d@black.fi.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: AM5PR0502CA0007.eurprd05.prod.outlook.com (2603:10a6:203:91::17) To CY4PR1201MB0181.namprd12.prod.outlook.com (2603:10b6:910:1f::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1879905b-aaa5-4324-4526-08da39a489ae X-MS-TrafficTypeDiagnostic: SJ1PR12MB6195:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4vIh26dYLkqUy18x59u2xfYedJxV79wzhjMK/IykfVd8x/8pDG83xVjznW2GWfLjohrcR74G1F+AFGmhV2st55qWLodh2IzzRtpW2gSPA5HoheDWjDG5tiD6Tv7holTiLKSDjtbbxLC89LyjLW0gobe97M9kl+eyEMHsXx/sdhNy1WdqVzV5anhjKqcA2Cz9SDH/fOrDoFFb+r38cx9tMFINsEYCfmQOmvdB+lnq4b1Cn7o8NTbwhEPUsHpGaXBbAF1UorCtJWurn6e0vDRsf5uOxxRPOfYiXEKBJ9WNQUD5/A5Ld3TvvpOg/M1rgvURXi/yLgqEb08lq5H+RwJImEpPE799lXtXV9r5Y1ZssJ0Ax5BEH+UjS44xLZFbjUWr5Yzn48ffxr8MOXGxC+GsSDCqxQJNQuazEt5MMF5u7L2e27Fht13ptu6T2QUd2mQ2Z2D2BIp5DfV3qCf/rWBSNHDvrRcvrazIDoALKHqZ0HrH81gRBVxcFEvRNxb1UBp+/yG3vCNtlGykKhmdicoS+RsVx+/d4CHWZQmt4QjBh0xnp+7aaQDPbqik/ZjOywvjzpZEaIck0bMTBrcn1KL7q0EQTpMRe7VrbqOJ9PM0cQKPrz1Q3LcxLHIhw9j9MRWTsTFrdtVcgZlUlmS1+ns3pzI3fx9FEsXb/LIuf+W4x7FeoBnyWFTwSxuTcpQWGWpsVW6TWpkgQaA+8xAd/2DtI7hidm4n8SyvH056W8rJP/E= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR1201MB0181.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(66946007)(31686004)(36756003)(7406005)(7416002)(54906003)(6916009)(4744005)(186003)(508600001)(86362001)(66476007)(8936002)(6486002)(31696002)(8676002)(2616005)(6506007)(6666004)(38100700002)(66556008)(316002)(4326008)(5660300002)(6512007)(2906002)(26005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NjE5WmtRU21TZ215dmtlZXpLT20rMjVQNkFDSlVHQkRyck5WSjJSNm5meTJm?= =?utf-8?B?SlJ0ZWt0eGFyMHllUXkrTzhGNzhUaWI3Z3NDMDZrSkFTY3I0TktHbnJINnZM?= =?utf-8?B?ZHk3blA3Wlg2OE1KLzlCMmdRT09vVFJPa0R0VlhMOTlFOVBlcWFOdWJJSzV1?= =?utf-8?B?Y0hQRmJxWk50dWV2a01SekNBYkk5emt0ZWJGc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ZvcFg3dmV4WSt0N0hORUFsdllmY3Y3eFNTTzZxS1N3?= =?utf-8?B?L3VHa1Q4SEVxWmlUa3J6L29FZW5KY2xIQ2l1eXRPRlpJSldQb3JuS3ViQU91?= =?utf-8?B?Qm41YXRQMGNoLzdUSUloL2tsTktXVFErSm9pOU5SSHdqQ3pPVjZ0YnR6VXVG?= =?utf-8?B?YXR6T0paRS9ibGc4VUk1djhiUlVLa3R2MnJ0cXV2T1pwNmFDTUIzbHBvL3cv?= =?utf-8?B?SlhxcG9uVmcxR1pZVTVOS2tlMzJJSVVselp0MXNSQXRVL05ic3JHZCtWbjl2?= =?utf-8?B?cDYyeThFK0Y5OWJiSnI3WlR3WisvNnZPNkd0UzEwY2dOaFFUVE9PZz09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1879905b-aaa5-4324-4526-08da39a489ae X-MS-Exchange-CrossTenant-AuthSource: CY4PR1201MB0181.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 May 2022 14:33:27.6947 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BKPrbw/12jVSJ8TMBvz1kVa5wChCBeyoFGUQGtqJUm/i9i3/nnk+1HGKYQ6WqKZjOjp9Nc334nqO3gg3P2K6+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6195 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,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. o.k. That answers my question. Thank you! Best regards, Pankaj