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.85]) by mx.groups.io with SMTP id smtpd.web10.4794.1672777678206735348 for ; Tue, 03 Jan 2023 12:27:58 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=zNwfWXKG; 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.85, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F5mX/7/nHUmXi0oG+kff/wh+f+pnKNXnntRxzdUcnxrZxEjH6fxp4gcRKCqUCSxryhYR9N67atBu8XST1K5RY4e2FBj2A6zSoHKg9ra56jTE/EPBA5R6gF0CbE5hWahT5aQW8A7YF5m+w3QZUhfvn2qIXI4zMVqdj0PpK2tK4yRQ7YUVgljhf7tXtjxL4pbnkLF83NrRD6Tu0xS0/cbbbBpf7l4pLpRbY84pNfADLJa8OqbS44a7xyuMZir+caO2PsvtY6vF7QyT1m3G7ze+BgliCnlal00j3fQzvy2OISDTEJy6wFX9/GiZ2PZM0v59GbcKhUppop6Zoob/k9EUSw== 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=PqwLVSWIm/j3ueokWX0AIUkfDwmkPJ5hOMjvcZkRIbM=; b=QwJ5NYRrJRoDa0Pd0Pj6ja5vmt3VKIGAoUQefSrpBhULWygywd1+G7amXKIgHnybb51SkY20pMmZ/bpQl9kVa7H+6HsMYwW165IuYxzb/h1oz/vwMpgPEn9pR7J/NuRv2D6RXsQppGszEWEaNoEy2Y6KysGGoag9JYjFkJwE1zrMuzjmhAuU5YB3LzDboMUMkXdBxeRiqRtgXuCuCMqurbExPfAo3qBEmqV9mI8fI7ANAkH0EIBLxludNBUqvmLt5EMtnjxR7KRcr1lRfpQu5StHTkJ03o4UXHEhbaLF6kCKgl7sXfWsUVNHhZSUwIv1Jp2FJJFQsa7dk18GL3wZxA== 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=PqwLVSWIm/j3ueokWX0AIUkfDwmkPJ5hOMjvcZkRIbM=; b=zNwfWXKGS4u0xksVUI+8GwN4lzD/6C6YL/FBBXnnfnEK4gDEukq0Jl4eeOuRMfmfb3ozodigYzsiVrwdmzl/mnW9lSRNN+ifs716bY/285KNHvGTwdx6LWKNtsg9SZUWZtLxDh+PWQiTHCj8MGeUCfJufpG2+XEvdJ4kaQNHm/c= 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 DM6PR12MB4186.namprd12.prod.outlook.com (2603:10b6:5:21b::11) 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 20:27:56 +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 20:27:56 +0000 Message-ID: Date: Tue, 3 Jan 2023 14:27:54 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH V1 1/2] OvmfPkg/CcExitLib: Move common X86 instruction code to separate file To: Min Xu , devel@edk2.groups.io Cc: Gerd Hoffmann , Erdem Aktas , James Bottomley , Jiewen Yao References: <20221229085548.476-1-min.m.xu@intel.com> <20221229085548.476-2-min.m.xu@intel.com> From: "Lendacky, Thomas" In-Reply-To: <20221229085548.476-2-min.m.xu@intel.com> X-ClientProxiedBy: CH0PR03CA0225.namprd03.prod.outlook.com (2603:10b6:610:e7::20) 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_|DM6PR12MB4186:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a81ce9f-bc58-4d23-6dd1-08daedc8ff6c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /GndnCZLaZVk9B+HYCvocCtu+2UrO9s3Y34R7pgFM8d8O742xsJbssahwlciYrDBanE3Daopw8uWgMdnfCn7YMmQ+gET2lrAABZIDJ3L6POVvY+OIRME9uwADDFc/+3Ig16VimsGndhYrdBVsLppQWpK9NFGSgI4xcNqcAbZuc/lCbxJVS4flmyn6QTAqmmmZJQ2wcB38nkO7buO+Kv+u0bEebr9N9aW0dQQ7wrF4frqmkn1c4WPVrSv3fxd3dr/+157gDlD1jU76NYBh1oxIbYlc5zIzABPxkif3SvdpHaVzzgtwvky12gQxCZeUrWrgTw3D8ds8pZwX7KM6iGJll62RSESlcjnVd5/CtNDxv5u2ppL6W8tzkW5/RGHMYA12tSg2mZ39a+gEfU5NSMdnSVR/9/HLlziNIrsM90M1IACcYmj7iV1n8XudXuCSGlR7hehA8BtAN7ppbszqxKWkXidLKSL9cm0SjQ72aiNaahmIqNe/LQTuHWDpvQ4Bifh6Wjkns+JI3aPCO160nePDT2/VrC5jGHWLZ0OxdrIg++lx9CueSn0OYZ1K/0rjq0AH79mHzF+YlDPuXYuGbaC8C1LWxiltln/KqVc+8vuc0x+b8qMuwTERcbJsxdPVt0ebgctWyvu3/hRtAq40xwlBmCttqRA0EVPxamvpBKu2o6KKfS03CbJ0xH82LzrA8IUpaRFKyfhRTNCrzdeaT1JOExnvysRLYNfvJ7yqBI6OFKLgLLJxgXIQ677r+MsoPas6hfqov/yi+JIt6lRclQsCQ== 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)(6029001)(4636009)(396003)(136003)(376002)(346002)(39860400002)(366004)(451199015)(5660300002)(41300700001)(316002)(4326008)(8936002)(66946007)(66476007)(8676002)(66556008)(54906003)(2906002)(6506007)(478600001)(966005)(6512007)(6486002)(186003)(53546011)(26005)(31686004)(31696002)(86362001)(83380400001)(2616005)(38100700002)(36756003)(22166006)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QjNRRElISll4aVczVW5tMXErVUswYWdHTWY4YmZ2YWJjVjQ1ZVNTa0VxLzlu?= =?utf-8?B?dTczSG91cEdpR1JxUFNPeVZVY01iaGtZRnk2MDVIdXRWUEhNM2YxeDM0c3BF?= =?utf-8?B?cHk2ekNPUzRiTGRDeXR0UEV2NEVuaWlXZnBtKzArMXk5WGNPNnd2UVFZZTUr?= =?utf-8?B?aE9ncmdpY0hkelZ1bXlWZW1ERFVhU255a3NuT3BZRXVScGxmQndRODFicm43?= =?utf-8?B?UjNldW1HUFdHK1pWWUlqQmFCV0c5ZzMyRGRpYkVtVDg4MmJnUUI5OEltN3BP?= =?utf-8?B?QkNibnhYK0JUaTJ2RWt5UTdsRVNsdlJIY0RsTFlvb2FEMjhQdXRRVEl3e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YcjrmCSHl6XUb?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a81ce9f-bc58-4d23-6dd1-08daedc8ff6c X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5229.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2023 20:27:56.2915 (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: l+GSetr/earnwHAti4+XZNoVKg6/MdDZ5OwJxD6I3vTO/a2BZ3xMhLN765EZaD3JyuD7OvrKbYMGhiPokmzhyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4186 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/29/22 02:55, Min Xu wrote: > From: Min M Xu > > https://bugzilla.tianocore.org/show_bug.cgi?id=4169 > > Move common X86 instruction codes from CcExitVcHandler.c to separate > files (CcInstruction.h / CcInstruction.c) so that these codes can be > re-used in TDX. > > Cc: Gerd Hoffmann > Cc: Erdem Aktas > Cc: James Bottomley > Cc: Jiewen Yao > Cc: Tom Lendacky > Signed-off-by: Min Xu Reviewed-by: Tom Lendacky > --- > OvmfPkg/Library/CcExitLib/CcExitLib.inf | 1 + > OvmfPkg/Library/CcExitLib/CcExitVcHandler.c | 697 +++----------------- > OvmfPkg/Library/CcExitLib/CcInstruction.c | 454 +++++++++++++ > OvmfPkg/Library/CcExitLib/CcInstruction.h | 197 ++++++ > OvmfPkg/Library/CcExitLib/SecCcExitLib.inf | 1 + > 5 files changed, 735 insertions(+), 615 deletions(-) > create mode 100644 OvmfPkg/Library/CcExitLib/CcInstruction.c > create mode 100644 OvmfPkg/Library/CcExitLib/CcInstruction.h >