From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (NAM02-SN1-obe.outbound.protection.outlook.com [40.92.5.80]) by mx.groups.io with SMTP id smtpd.web10.2920.1612492637847558168 for ; Thu, 04 Feb 2021 18:37:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@outlook.com header.s=selector1 header.b=JhjhUCy6; spf=pass (domain: outlook.com, ip: 40.92.5.80, mailfrom: spbrogan@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YriUjbz1xTKQf2R+lua+fEBKIr3NxJ9wwAmNaBNWjIoqQwK12kPUpq6Y671mF7tT1o4WCjm33OYNFh0/i2Jj9tRnjNT8QcquK6E5U9GwVZw6LG3dn2lXNFi4xGzaY5QGsLEJ82CSXsVA8wDlcz9Bolak4LRi4zpmQbGw1cKLANRxkDB5Av9BhryPwMins39/0ASDLsUTZvg8FhctyLdQQHKFLCkaOYG+gr09OrcJ9aeHzAh3Ns3pCvIh8bIqXgG94cYjgXJF4zVOyt41PtwYgCnLkPfckJmvts6F1TI+vVAEIlbX6CLlGKV8/wqKnhY+UBFfA8tydUr+BhK0inhJkg== 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-SenderADCheck; bh=dXylumbFLDj/sJ4uKQP5AF2hM2/TUoyZJln6dvQw05g=; b=h1K0QPyYVip22ySmqi7B5LX6h5UzIEx7Xwf9bBD6hQhAJzbRgD+OTSCkk1qtb75PXGvNF4jTQam8AZoZDqyMZnvQEDI3e4QYJv23H7VUP4CX3iQ6klHEpEtQOljmuSI8crxika9SLgqcV2bQqDVIKPHL95KTTjYeTYIO0bIOcMQkxMbX9n5I/yCHXu7hK1X6QI8BFDCQ56H27BNLaOwiQFZdMRDLKqdmmvPvVSS1DC3PRO4/n2uQDV39qX6KaCLFshFhwIBR9nSfh4FgTxALd2y7F94J1O+x7hVoKZ8/QuLgdD0dr3tIHD6V5LkaNGaAp9fnXsj9mvkYbO56y0SZlQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dXylumbFLDj/sJ4uKQP5AF2hM2/TUoyZJln6dvQw05g=; b=JhjhUCy6tbWVPzNPXMp/+Ma0H+OOBqgUNaNsvRVZRhf0fI/+iup7i1Gi0DAi3zvPNM4U/cEoHWLSOMrX2YKlUVIylkhWcbXHYgZv3iwKeXhgHqhDP+CvPDAOATJyl/VcJMKDY3iOHfBfn0eP+o6HoDi3CRSjwl9xUPpza100pzX8XNpvKFfDGXC9zHOuPzaSFIbsFm5nl3h6KDrDbd/OIEQv9BxzQjKFcHYsic8WfI7PrOS7FeHqXGXb2iIR4GNqroxdEISMnPLciXM4SoINDCxsxxYOsAh/zM3+kxn0RWybumFyqoe2KaiL9MilJZOtDW4mEH2BiY31vhJ/CTT7rA== Received: from BL2NAM02FT011.eop-nam02.prod.protection.outlook.com (10.152.76.53) by BL2NAM02HT148.eop-nam02.prod.protection.outlook.com (10.152.76.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.12; Fri, 5 Feb 2021 02:37:15 +0000 Received: from DM6PR19MB4010.namprd19.prod.outlook.com (2a01:111:e400:7e46::4a) by BL2NAM02FT011.mail.protection.outlook.com (2a01:111:e400:7e46::261) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3784.12 via Frontend Transport; Fri, 5 Feb 2021 02:37:15 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:2C5F93E88E4175D083EE60052437141D46F3FBEC39F74E13458B07F6D7DB795B;UpperCasedChecksum:CC2848A3EB9F499CA408BB99F2E0D686D67D224FB256E6C0DF988F7D012BB352;SizeAsReceived:8984;Count:48 Received: from DM6PR19MB4010.namprd19.prod.outlook.com ([fe80::65bc:48f:44d5:424c]) by DM6PR19MB4010.namprd19.prod.outlook.com ([fe80::65bc:48f:44d5:424c%6]) with mapi id 15.20.3805.026; Fri, 5 Feb 2021 02:37:15 +0000 Subject: Re: [edk2-devel] [PATCH v1 0/1] Introduce DxeMmUnblockMemoryLib Interface To: devel@edk2.groups.io, hao.a.wu@intel.com, "kun.q@outlook.com" , "Yao, Jiewen" Cc: "Wang, Jian J" , "Dong, Eric" , "Ni, Ray" References: From: "Sean" Message-ID: Date: Thu, 4 Feb 2021 18:37:13 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 In-Reply-To: X-TMN: [kozATat1h9Hv9bKSFfVCfuT9nKJqUkXR] X-ClientProxiedBy: MWHPR07CA0011.namprd07.prod.outlook.com (2603:10b6:300:116::21) To DM6PR19MB4010.namprd19.prod.outlook.com (2603:10b6:5:24e::19) Return-Path: spbrogan@outlook.com X-Microsoft-Original-Message-ID: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.2.78] (50.47.113.221) by MWHPR07CA0011.namprd07.prod.outlook.com (2603:10b6:300:116::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3825.20 via Frontend Transport; Fri, 5 Feb 2021 02:37:14 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 8690dde3-908d-4e1c-14d4-08d8c97ef30a X-MS-Exchange-SLBlob-MailProps: =?utf-8?B?YlJwaE93QzE3K0RDcVJKa3VkMTFHM3k4MjJ1K0lQQThRRWVsamhnWXlNZEVE?= =?utf-8?B?TGt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SvN33t14/BORBjbXvCkG/MFsKUYy30vwK5A6ELi2ZWJRyUXezl/g0 X-MS-Exchange-AntiSpam-MessageData: Coim29QAmOYY/rDYXhYCXuplWPEHsqAYLfBQEIdJ+wgcYPw5Z2VKnpNlGAqlyRqEhkLG7rcqiN17Y+ZUTr1W5MzNguAcB3HzauH1qiIwsVBM+IUzyaTzaXAVhurXannyZE17Tt4jBU7tR0A72dioQg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8690dde3-908d-4e1c-14d4-08d8c97ef30a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Feb 2021 02:37:15.6637 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: BL2NAM02FT011.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2NAM02HT148 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hao wu, I agree that for reviewing this change that would provide more confidence. The real issue is that there is no x64 mm standalone solution that blocks memory access in edk2 today. So implementing this interface in edk2 doesn't make sense. It would just rot with no users, validation, or maintenance. The interface is needed because this is a compatibility point in other drivers. Without it, those other drivers need to be forked and then maintained and that is not in the best interest of anyone. To push a new standalone x64 mm model up that blocks dxe memory space is not small task and we are working on it and are happy to contribute it to edk2 / open source but it will not happen quickly. So step 1 is get a compatible abstraction/interface added. Step 2 is work to upstream the core modules. We may be able to share the core modules with you if you want to see them for review purposes but we need more dev work before upstreaming the change to edk2. Thanks Sean On 2/4/2021 6:17 PM, Wu, Hao A wrote: >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Kun Qin >> Sent: Wednesday, February 3, 2021 6:16 AM >> To: devel@edk2.groups.io >> Cc: Wang, Jian J ; Wu, Hao A ; >> Dong, Eric ; Ni, Ray ; Yao, Jiewen >> >> Subject: [edk2-devel] [PATCH v1 0/1] Introduce DxeMmUnblockMemoryLib >> Interface >> >> The interface proposed in this patch series intends to provide an abstraction >> layer for DXE drivers to request certain memory regions to be accessible from >> inside MM environment that applies total memory blockage. >> >> This abstraction could pave way for models such as Standalone MM to >> manage memory resources without having knowledge of DXE memory map >> inside MM environment. >> >> Example usages of it can be NVS region in Tcg2Smm and runtime variable >> cache regions in VariableSmmRuntimeDxe. > > > My thought is that it might be more helpful if the whole implementation proposal > to address BZ-3168 can be provided before reviewing the interfaces for the new > library (or the library itself). > > Hello Jiewen, > > Do you have comments on the approach on implementing the BZ-3168 > (https://bugzilla.tianocore.org/show_bug.cgi?id=3168) feature? > Thanks in advance. > > Best Regards, > Hao Wu > > >> >> Patch v1 branch: https://github.com/kuqin12/edk2/tree/unblock_mem_v1 >> >> Cc: Jian J Wang >> Cc: Hao A Wu >> Cc: Eric Dong >> Cc: Ray Ni >> Cc: Jiewen Yao >> >> Kun Qin (1): >> MdeModulePkg: DxeMmUnblockMemoryLib: Added definition and null >> instance >> >> >> MdeModulePkg/Library/DxeMmUnblockMemoryLib/DxeMmUnblockMemo >> ryLibNull.c | 40 ++++++++++++++++++++ >> MdeModulePkg/Include/Library/DxeMmUnblockMemoryLib.h | >> 40 ++++++++++++++++++++ >> >> MdeModulePkg/Library/DxeMmUnblockMemoryLib/DxeMmUnblockMemo >> ryLibNull.inf | 29 ++++++++++++++ >> MdeModulePkg/MdeModulePkg.dec | 5 +++ >> MdeModulePkg/MdeModulePkg.dsc | 2 + >> 5 files changed, 116 insertions(+) >> create mode 100644 >> MdeModulePkg/Library/DxeMmUnblockMemoryLib/DxeMmUnblockMemo >> ryLibNull.c >> create mode 100644 >> MdeModulePkg/Include/Library/DxeMmUnblockMemoryLib.h >> create mode 100644 >> MdeModulePkg/Library/DxeMmUnblockMemoryLib/DxeMmUnblockMemo >> ryLibNull.inf >> >> -- >> 2.30.0.windows.1 >> >> >> >> >> > > > > > >