From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.84]) by mx.groups.io with SMTP id smtpd.web10.8177.1671286710190918625 for ; Sat, 17 Dec 2022 06:18:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=5bfrXIcR; 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.93.84, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XPXN48q9C66ng9p/qEtUI3i2BCMhj1eFgk+FETBHxJeoLQdMPk2S1ybbZQdQwkjnUTfz/3JCsG0m04iVKb66h7ssIiEYtUeM2h3iIPFV5p11X/JNOdZ6/jB4q1hjTYBn6bx5Mb2EF7bs7GgpYpF6UE1QQblfS2bmzzg6SAA8zvh0YD/xLc0IedOVoLmKxcWHcj/xJrIMJ99AYk+RfBFxZrTgaSgI+dxXF9LC60TI4M+5ZE7uR5g5Oo6t5qC8GVNSzrVXofbhfRpNbl/bcASQtnFptaI1zWxhR7FqBirs1lSLhH8ZvIPc2EvQo/tKSLK9d4G9Kh8XC11B2EIoFG76kA== 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=jHTwesxBubv8vWDJ5K1AJM32xq9ZmYeA6ENvf/DQPCY=; b=hIQNTGEfG7UVPLSCqA8j5uj6GYNGZ0xJRocigeN+bsRtLhX+BrvhnxyEg82RFnWa88aWS8Kr21C3VDyR4HCX+jLEmogLPHVV2JAS3u0oyJpoHgni9jBeYxMt+kuRhMuu6g8LT/0wboM9OsiHZWeKEiV05N/PHI/0jg3QJSxE1SHfEp11LmOB2KaicBDG/zIrbDIPXRVNgg2AoH6odSq6UWMHafRjaz9oaPMVF6qlzffHQRzgzPl5f/MWWxfnRlorQKaQ7esZGU3YXon/nSaWkrrb5JnQydf7LWqDy0+oTVW7jq7oahWmA7pKrmk8R+9okZK1JLs3hU2+RNqO/epxBQ== 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=jHTwesxBubv8vWDJ5K1AJM32xq9ZmYeA6ENvf/DQPCY=; b=5bfrXIcRWjzLcUEc+GfaniiEXUOhYwDeoeVANxNyhnjQK50XGECtZ5sH0DGfYg1aKHq2tcCrVc8j21nh+7knKvcnDxxVCUvlIeP6mnM28rKwHKUPcrLdGx3Vh9JaPAIDBOovlVFMVTBBssc6GZNQo0dJK+MzsdOEumUzJI9Mex4= 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 CY5PR12MB6525.namprd12.prod.outlook.com (2603:10b6:930:32::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Sat, 17 Dec 2022 14:18:25 +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.5924.016; Sat, 17 Dec 2022 14:18:14 +0000 Message-ID: <6eb5920b-fefe-c003-876e-2e22f1a67ab2@amd.com> Date: Sat, 17 Dec 2022 08:18:12 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH V3 0/4] Reserve shared memory for DMA operation To: "Yao, Jiewen" , "Xu, Min M" , "devel@edk2.groups.io" Cc: "Aktas, Erdem" , James Bottomley , Gerd Hoffmann , "Kinney, Michael D" , "Gao, Liming" References: <20221215051810.2027-1-min.m.xu@intel.com> From: "Lendacky, Thomas" In-Reply-To: X-ClientProxiedBy: SN1PR12CA0100.namprd12.prod.outlook.com (2603:10b6:802:21::35) 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_|CY5PR12MB6525:EE_ X-MS-Office365-Filtering-Correlation-Id: 6854d2e2-e1e7-4937-1786-08dae0398919 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6IiYQaZudJ0bDgCYUtnb5nTn3pr9AxPIs1kNAkzbba6MSJd+n5+8erYdmPY1WPyrG1mTu9rOl+PPo2VRgjeYNn4qz0sDF1UuVfdcRXG+okV7OAWQVbcdzgcKhpZiR8a2hjxiaVELuZd/TIa2WR536bvzKEsT31Es8qsiiIIwtXRVgaiSe9JGxQ+bQbt3b0YK3NnLBj1gWLORsyf9MVTDR/iY9TB70KznGXGPEIlDYCUrajiTXqykezh/UMZYDYpKwQGgZ6pwnOW1BTeI2wvR4D5kUhQ/yyxipX7yeHmDlGEcKCuVF5GNFonnOQzk/rJEgtHhNYbzuNsOv0P/b5DhCcefsZC22HGNEQziMSjRUWQpeEWXddANjJhat+uqRqKfmK1UKRn66rwlAWW82PkqZcozUW7pL1nmHhMMUd/qLbsnSeSw37YTJMLkbL0CrUs5LW+oe1h1Px/uQYs2/t4Rs55Id2g3VaYGgkCsyE8asJBHzs9X8341RQB2uIoC4oH7BV8yYln+G9rkH1Z+E6EKmvGmJk+uN5CO2EJIaEBr4rLPglCtKJ8WBEVf0+qKzOgFuUojvB20Lgk1SfDayvfYdq1mYv75V+wxKaAzqH8hjF1o+JUfoEOTwOrcSlVUs1ZOkpmTGrM7qGIVZiqpg+l2RXSwN7GkTJl2KIEefFuysVHGWjOZ8Oka3MSoqz4mfCjSyFLkOTl4EoAsBfn26EMWJf1P7Yc5DQ8IoZLZ+K5QX6bN5t8vw/4UDunEWuxwKk+Y6zUTHrFQI9RoZqUNKRgyMuqBg40pqzwMLRwWRiMEYF+YLL9G6O/dekOn9ZrFc1AP 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)(376002)(396003)(346002)(366004)(136003)(39860400002)(451199015)(66946007)(86362001)(66556008)(31696002)(66476007)(4326008)(8676002)(316002)(5660300002)(36756003)(8936002)(41300700001)(2616005)(186003)(6506007)(6512007)(83380400001)(53546011)(26005)(54906003)(110136005)(38100700002)(966005)(6486002)(478600001)(2906002)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NytDVVU5SWtXazRoeUZjTUF0emF5VDZYOExRd3JhT2xaTFpMWVcxeFc4UHY2?= =?utf-8?B?azFEamtxZ0lCZHdoenJlWFA3Wm1jbUtSb2U5bWNieFdEYTMzV3JCSjFVek9D?= =?utf-8?B?WVJTZXVWbXBBZ3V6Wk93N3ozZVl6OUZnMG42OFpIVlV6VjRFdGtNWlI1WXcv?= =?utf-8?B?c2xVRkwydkdlZUZqdjBRbVZ3bmhuc05ldjFVdjBhd3FHWHI2ZFllNHlNb1cy?= =?utf-8?B?NjFLcGZzVU1BMTZrT25ZRllTSXN3WjFKMzROMjh1NkdMUktsVm9UNWVTR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YkVuNEZoZGNKQTA2ZWhjRm1tVXZY?= =?utf-8?Q?q0R/S6yagZM5XVPKfWQ2WXVE6?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6854d2e2-e1e7-4937-1786-08dae0398919 X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2022 14:18:14.6101 (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: lJnrOqRtOxiuzO+bKLi+78QIl3rjbBMzso0zaCtocwnrIOss1bA+U/AxXT+uG9aFc1sH8EMl28MUU/DUMpUi1g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6525 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/16/22 21:11, Yao, Jiewen wrote: > Hi Tom > Any further discussion? > > I would like to merge if no other feedback. No other feedback from me. For the series: Reviewed-by: Tom Lendacky > >> -----Original Message----- >> From: Xu, Min M >> Sent: Thursday, December 15, 2022 1:18 PM >> To: devel@edk2.groups.io >> Cc: Xu, Min M ; Aktas, Erdem >> ; James Bottomley ; Yao, >> Jiewen ; Gerd Hoffmann ; >> Kinney, Michael D ; Gao, Liming >> ; Tom Lendacky >> Subject: [PATCH V3 0/4] Reserve shared memory for DMA operation >> >> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4171 >> >> This patch-set introduces the feature of reserving shared memory >> for DMA operation. Its intention is to reduce the allocation and >> conversion of private/shared memory, so that boot performance >> can be improved significantly. Detailed information is in Patch#1. >> >> Patch#2 renames AmdSevIoMmu.* to CcIoMmu.* because these 2 files >> support both SEV and TDX guest. >> >> Patch#3 is provided by Tom Lendacky which add SEV support for reserved >> shared memory. >> >> Patch#4 updates the related section in Maintainers.txt. >> >> Code: https://github.com/mxu9/edk2/tree/IoMmu.v3 >> >> v3 changes: >> - Check mReservedSharedMemSupported in >> IoMmuReleaseReservedSharedMem >> before release the pre-allocated shared memory. >> - Delete a line of comment in Patch#3 which is suggested by Tom Lendacky. >> >> v2 changes: >> - Add Patch#3 which is provided by Tom Lendacky. It adds SEV support for >> reserved shared memory. >> - Add more description for mReservedMemRanges. It describes: >> 1) How the pre-allocated memory is managed. >> 2) What if the pre-allocated memory is used up. >> >> Cc: Erdem Aktas >> Cc: James Bottomley >> Cc: Jiewen Yao >> Cc: Gerd Hoffmann >> Cc: Michael D Kinney >> Cc: Liming Gao >> Signed-off-by: Tom Lendacky >> Signed-off-by: Min Xu >> >> Min M Xu (3): >> OvmfPkg/IoMmuDxe: Reserve shared memory region for DMA operation >> OvmfPkg/IoMmuDxe: Rename AmdSevIoMmu to CcIoMmu >> Maintainers: Update OvmfPkg/IoMmuDxe >> >> Tom Lendacky (1): >> OvmfPkg/IoMmuDxe: Add SEV support for reserved shared memory >> >> Maintainers.txt | 2 +- >> OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} | 204 ++++---- >> OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} | 0 >> OvmfPkg/IoMmuDxe/IoMmuBuffer.c | 495 ++++++++++++++++++ >> OvmfPkg/IoMmuDxe/IoMmuDxe.c | 2 +- >> OvmfPkg/IoMmuDxe/IoMmuDxe.inf | 6 +- >> OvmfPkg/IoMmuDxe/IoMmuInternal.h | 179 +++++++ >> 7 files changed, 781 insertions(+), 107 deletions(-) >> rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.c => CcIoMmu.c} (85%) >> rename OvmfPkg/IoMmuDxe/{AmdSevIoMmu.h => CcIoMmu.h} (100%) >> create mode 100644 OvmfPkg/IoMmuDxe/IoMmuBuffer.c >> create mode 100644 OvmfPkg/IoMmuDxe/IoMmuInternal.h >> >> -- >> 2.29.2.windows.2 >