From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.65]) by mx.groups.io with SMTP id smtpd.web11.66451.1672760345899206998 for ; Tue, 03 Jan 2023 07:39:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=G2f8944L; spf=permerror, err=parse error for token &{10 18 %{i}._ip.%{h}._ehlo.%{d}._spf.vali.email}: invalid domain name (domain: amd.com, ip: 40.107.220.65, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aRU0foRw8euo3/Gi1PzaED2zKJnMY53m7CbyNDx6EWUzVqnLI1yFWRjrbtmskBxBJhDD9h76fYemPJK6JvDeoCE+QLEBdAm1gwa0Gh1g/IXSrrZXhkctCxYUX74+u5nB9pWlZQv4LaVLyOAYWF4hhN3Qpiko0CLrLtuoqvk1AjSS06vBJ+vqZOT6l0mkqIWWgulKeccPhG8B6IM+PyBAj6JRRa/6iMwUVUZP9L2i1Fes1bdMmzyFLWsMMZT6gBhYnU3QFw6bQNW+uSEiUanrsFkdWeWmbpXy7MMdMaTp2fIY/cQxzk0h6v7zgFjKMQhCJE/dXrX7BMxBTNHlNrNu0A== 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=vvFb+UL+yRlSsD64n5OyZe4ZFPgrZLqq2PeQiPtPqxc=; b=i7ahAmN0tMApHspWmrmhIRdizVp8eC7Ws0R3qLXNm0Kz4OP+2u+5fe3ne59e/KpeRoF9t7MWp/JFt/Rvq2WoMjMW5hJz/Xr1zPyiw9psqwPqIn6+Mg2Y22YSDzMBI9Mk4pVpK9aGEgWfGeSravU/WOQ0clekYyXOtLkNvojfwvavRIg5S3+Ulo7Ar9++Qn9B8tNdaxDG/HMLv2wASTfTnWQ1u8B96RqZKjbvm+tZRXeXpNldocvKZgIpYqRWiuMB1tsofwS2AoXoX+9Vnc4I1GqVe5Wf1nGdmCe2O9kKdX/A0zMvA4KdF5+3/t/5Om5+xE1E2B8JqcFnE7THlGjbSQ== 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=vvFb+UL+yRlSsD64n5OyZe4ZFPgrZLqq2PeQiPtPqxc=; b=G2f8944LOT5booDYYhOrZuUi/n+qBMckS3JKyOh2ZdngYxcWq0x2xrAYMziuT6lYXYvitD4XF1XgffXhPenhKqYzPm9WXWvb+Uk8TT89Yb8k2xVtbY/79Npvauzi3RJyOnk0iGaE34A4Nfi+1kujqdEZeGImOH9jXex8UapDMOM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) by DM4PR12MB5771.namprd12.prod.outlook.com (2603:10b6:8:62::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Tue, 3 Jan 2023 15:39:02 +0000 Received: from DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::8200:4042:8db4:63d7]) by DM4PR12MB5229.namprd12.prod.outlook.com ([fe80::8200:4042:8db4:63d7%3]) with mapi id 15.20.5944.019; Tue, 3 Jan 2023 15:39:02 +0000 Message-ID: <5cd96451-5b40-c42e-b6b1-819034052a7c@amd.com> Date: Tue, 3 Jan 2023 09:39:00 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH V1 0/3] Customize lazy-accepted memory size for TDVF To: Min Xu , devel@edk2.groups.io Cc: Erdem Aktas , Gerd Hoffmann , James Bottomley , Jiewen Yao References: <20221226013338.1924-1-min.m.xu@intel.com> From: "Lendacky, Thomas" In-Reply-To: <20221226013338.1924-1-min.m.xu@intel.com> X-ClientProxiedBy: MN2PR22CA0010.namprd22.prod.outlook.com (2603:10b6:208:238::15) To DM4PR12MB5229.namprd12.prod.outlook.com (2603:10b6:5:398::12) Return-Path: Thomas.Lendacky@amd.com MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR12MB5229:EE_|DM4PR12MB5771:EE_ X-MS-Office365-Filtering-Correlation-Id: d8847b5f-647a-4384-39d5-08daeda0a3de X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2a0U4WQcAHjosvIWTUgByerLip6tyXh4X721GXU+YQM0Y4kcs/I8GcpEbca/G569tPws0A1ZQhcc2f5oyaY05UksQ7M0Nx1tG5En+OKn37aRFnz+j0Slqnn3JjbOlJZKLBlG/JmDJ6cJseUChmHScwvCCPNPdMKZPu4VK34vQMuoXw4OwcYPGNCVBb/xO8JZgCtMdmzal6wOynjiWnYxjd9vdFU1mh1/j9q4JSIBD2DQh4280VMVDZb1BbN2gsBlnALx1LyDU2CxWn4avB/iNNNltTk3po7DiDDGXTbg6krOrMSfgQDlCNC/FxsWsLjkz3hXwjjVqwHOH3waNE54Cekgr3ImdTVzyBywVHM3dEEqMZIPVkceoHoDpjAZniTLLsTaSHwJWELOXeN04nPJBEKWG72vnEMauc4TRUXcqViNg1uWAZu0njgRgBC4aBgI0y6+aweDXHDhu/Z13EuW7noIk6YzBbVmWitfc5ZyYuAAn9j64Mv4kWRP88OKILaq1hSf+2kDmxR7k8QzRi+8y9sfDL87EmVsUATNmwlB8EI9eojJZkyEx+4odFK6aBAWkr9wpTdgg4Ho3aigOkT7MtFs9kRk4KhLyGZlPtr1KMhyxItxPXn1aSqk59izjazFwvKZ9f+BqcIw2g05vkz9CMsDAypmA4Ux8uiHWn6MuK6dvwf3rCtgOfipLF8qMLL1gZuOhx31b4FI1ASgnsJhcyrTD8FcVnxdtaPCQK8+RrJtGoKkuDOlb04pHEIXQr7ikGAkLyTAyJdGQyzGxS+4egg+h81Up8yzqjrXPcyI0gg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5229.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(346002)(39860400002)(376002)(396003)(136003)(451199015)(5660300002)(2906002)(8936002)(4326008)(31686004)(8676002)(41300700001)(478600001)(966005)(66946007)(66476007)(54906003)(19627235002)(6486002)(66556008)(316002)(2616005)(53546011)(6512007)(26005)(186003)(6506007)(83380400001)(38100700002)(86362001)(31696002)(36756003)(22166006)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?RWNsN2FpYUNEVytjejNxV0JpeEJkZk9oVkxzUUh6UmdUQ3Vmb3hSbGR1TDho?= =?utf-8?B?SXo4a1E5VG5ORUpIMjR6YWlsZ2MvS2ZqVjZMNkJYYU5UTGlrZFFVdFdJcUd2?= =?utf-8?B?M2d2Z0VYRWJDdUlkSTlTZmd2M0VHaFRnaGUrNmlsa2o5S0hVQXpJOHQweW9X?= =?utf-8?B?NXFDbE9iRDNqWUpvT2J1bkFMSG1lN1ZGNEI5NW1wVy84dUZYeGErQzB2UzhH?= =?utf-8?B?dU1IZk5CdHBYME41NG90N1U1L1A5ZDMrUjBIYjJHejk0emc3UGtkV0dxZ2gr?= =?utf-8?B?SjdYSnIzNFRPZGdhSX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JbVhkOXNEZVFBZXVUSTRRb2FPdEFBaGRu?= =?utf-8?Q?4HIWlTFDSi7Tnmd0jJjiv/XUt?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8847b5f-647a-4384-39d5-08daeda0a3de X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2023 15:39:02.7396 (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: LQJLpTd0H5gF7ow4C2VPb6DrggqO4jDY4fIdMp7hlxzmWu6eS1ZvZ1uvA6XFDOLPSGQnwbu/gT+547mZbQg5NA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5771 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/25/22 19:33, Min Xu wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4181 > > Current lazy-accept accepts the memory under address of 4G. To improve > boot performance further more, we introduce the feature of customizing > the physical end address of lazy-accept in build time. > > The end address is indicated by PcdAcceptMemoryEndAddress. It means it > accepts the memory under PcdAcceptMemoryEndAddress. The default value > and the max value is 4G. This is to be consistent with the current rule > (accept memory under 4G). > > In IntelTdxX64 PcdAcceptMemoryEndAddress can be customized on-demand in > build-time by adding -D ACCEPT_MEMORY_END_ADDRESS=512 in build command. Wasn't there an agreement against modifying the build environment like this for memory acceptance? I realize this is not an accept / no-accept build environment change, but still... Thanks, Tom > > Code: https://github.com/mxu9/edk2/tree/CustomizeLazyAcceptSize.v1 > > Cc: Erdem Aktas > Cc: Gerd Hoffmann > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Tom Lendacky > Signed-off-by: Min Xu > > Min M Xu (3): > OvmfPkg: Customize lazy-accept's end address > OvmfPkg/PeilessStartupLib: Update ConstructFwHobList for lazy-accept > OvmfPkg/PlatformPei: Adjust LowerMemorySize in PublishPeiMemory > > OvmfPkg/IntelTdx/IntelTdxX64.dsc | 8 ++++ > OvmfPkg/Library/PeilessStartupLib/Hob.c | 25 +++++++++---- > .../PeilessStartupLib/PeilessStartupLib.inf | 1 + > OvmfPkg/Library/PlatformInitLib/IntelTdx.c | 37 ++++++++++++++----- > .../PlatformInitLib/PlatformInitLib.inf | 1 + > OvmfPkg/OvmfPkg.dec | 2 + > OvmfPkg/PlatformPei/MemDetect.c | 13 +++++++ > OvmfPkg/PlatformPei/PlatformPei.inf | 1 + > 8 files changed, 72 insertions(+), 16 deletions(-) >