From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0619.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe45::619]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B70E421AF39CA for ; Wed, 24 May 2017 06:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8/kuyV/QGKkalnxdJDcoJx2BhIG+MyXBohRo6ukZ+UM=; b=fE5EUA3zX9GkwswfPLLyDE6TbYoB2lRPgoDPvFbNSo/iqJbVqm+J4/iDDhpaxVyO/CwzXquiid7kJKwLjwtRN+RgHF1v3tfyi2B+L1hJfCJwquUntAqLZb8H98YLeYDJkvSJadVD63g8MFSjfX3gjTN4I33eK9Y4o49AwQSauTg= Authentication-Results: amd.com; dkim=none (message not signed) header.d=none;amd.com; dmarc=none action=none header.from=amd.com; Received: from [10.236.136.62] (165.204.77.1) by DM2PR12MB0153.namprd12.prod.outlook.com (2a01:111:e400:50ce::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1101.14; Wed, 24 May 2017 13:23:42 +0000 CC: , , To: Laszlo Ersek , , References: <1495466592-21641-1-git-send-email-brijesh.singh@amd.com> <1495466592-21641-5-git-send-email-brijesh.singh@amd.com> <868ad318-c652-55c2-4b4c-eeeec2f826c6@redhat.com> From: Brijesh Singh Message-ID: Date: Wed, 24 May 2017 08:23:37 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <868ad318-c652-55c2-4b4c-eeeec2f826c6@redhat.com> X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CO2PR05CA0069.namprd05.prod.outlook.com (2603:10b6:102:2::37) To DM2PR12MB0153.namprd12.prod.outlook.com (2a01:111:e400:50ce::16) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM2PR12MB0153: X-MS-Office365-Filtering-Correlation-Id: 636420b9-d9a4-4f63-0b69-08d4a2a81975 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(48565401081)(201703131423075)(201703031133081); SRVR:DM2PR12MB0153; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0153; 3:tcmxupbdPiJyTvwK9S64oqbvxyLJFdF12T/dN2BSQSjlfdKAbevTYFPVSd7q29VRF5TPMVg3Y0nH/IUiLSvE/xwWTtfJV7RlU+FmGcJEd6nasmv7c53TNrwPS2PzniKTUwiNfFI7I9dYSmyEMVlDKIgxv6nxeQNKK+j2VpioAXdHYvutY0M6IzjJv752Vh3ORapY8EsHbXMk+vklisBxmWbePu4nBK4VoxxVaVxeTgpaq0mmJFyh5KUrSx2j6LF6LDgNdE4MUKJHHBiempUf2XOx3VyfskHEeW8UlYej3pp3YgNEpHrJ3gozsZKD6nwTb3/DwKFrFBMRZuctUPUh1tDB24PKnW9Zi72eMkdwUzA=; 25:HsysalsxMmT8qoCUzTivoZBHtSwCeSkU3Qwakorx1/uFgzAdLpagSEyquL+yHMCA9GVFoOiikg3IuQ/eSJaFhSY6ezPPOF+P6vXv8swN0vtawxnstjIIobj9NUuOom43V3Pm7H9kG8fbI4pcm8+u/tpJ61IrO0XrRxakmhdGCKbtFtEWpeoqIBmYdqJGepnXH53fBDcXkF7JdpUU32qwypdkA9RWShGVCZ0UVtqQ4y7zLgWu6V42I1HbgwN3FjwYkEBx+kActlE2QpHVf/Kbnm8ZpPJO2NNMVUsNSZFYEG/dhORoaopq07USt/njSauGoWlwi4EGmNYHwhcMgj6rxqzgJr+gLhN6rEnHQu679U+SjG4Lywqr0CX8TvcU7WqbzBFJu06g9qzKJEAOQQzzNkWKDKyDtvaLyeYAN5hwwnXeoCLhrE0AR5bwmo+YvKcMq6vsExtzy3Upjh4yVxJcdYfETEDhL9v8hIqI+m3Kgf8= X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0153; 31:/u4WWjgdaDzxyACQ1kONR0MgzvJfply/ksBtLuh0fLjlEjFXfnrizud+liX18dVTt4akP6aRcpRo2wceBOijandb6PiAp6OLnAKWV4I1R55Yj/VmJPqPIX4KGgFk9NAoKhiIPHe/HJIFs0WrU+6fBI3g19PDt/ThymvSqIoHM0A3xw1H91GM6pGjZOsy0SxTpUNnEB3Ki0/N7t+dM3r5qo9gAhTyy5jcGfsuBEfZtBE=; 20:8Tk8C3aIsbcciosSBbowi/KrUrS3bRIaDDQO+RtDwZ+NYMwe5zJOhQFEiifNORmZVcsDYY/Oyd0oUGwfy1y8JE4cluD1IKdxYNTFuf/s4n0pDzNSmkq1yaEBQPmLIZHJlxUeohgyNUL5F0n3lPS74WEjII0wmslYpNTBDiA2ITtT7js4dhtDsXzFrKc5Jo52ydakbCXptONn0S05UHLQmhWCNZlCDkS6hhtsh2sfV85rg0rnB4x0Y0sZhKvLrXUDrW0P9D7h9cxY1lrvV1hD/gOlQm6CVtUj6QoDh7/rsESiTvBYXkbTLYx/DjrutX+485GcF4yMjTkYnQ52r7o2nDfPIltd0rVWMH8rrDx6guxpFWv8LBBYtWDLn45iSr4yJN5INxjCuxJlsqzOu82YlVmwCC7uNe93iWHnWlEGFF529DKVIi8aYl37SjTIs31Zq2jd8m7yTf+dMuXBm1Hz0P6Bc3XSkfRU2pxFHBN+M2jubTMnuZkqHE4+neBaDaTi X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123564025)(20161123562025)(6072148); SRVR:DM2PR12MB0153; BCL:0; PCL:0; RULEID:; SRVR:DM2PR12MB0153; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0153; 4:ybUIfvKiLsQdw2vhQO/xs5aohxYDv7k/04imTPceF1l/3IzSJiW0K8iaamLQN+ugY6fUMRXdw1n3ResgzpfLRHKpPjhw77f65MBnMLxmv3N6pRx2lKeKgvlXapuXcQAhovFQ+fHeuHU3ANhRGViYtTcyo1oZNVcGOZ4PkVPSuIYG/O56SGIW3GOphQdI9JsOHpqUYbT0kbGCGl3Zcdo84ybTuUTgc5HIG9cnHyg1aZ57shWtfZNd88TzkBXV2TjjaJ8aMfuFq0pJOEddpbLlHQ9a6rzxWWO44x3cONMAn86Gk7MaQacgAR4vAQhUveoj9ZDPBVAjSDBnvl35nr6L2qhALikAaYO9UAoBlylvFY2Ysjd/yVG+4yiAbfp2Uef4WEfk+p663LWuHdL1acQ42zKaBzBc3Ud6A5n2ylnUKqQDEa2M2khVDXwhCA6IAVhlKy4lGlTv3SFT1F6mEj1qjOc9kdwyqvTQCcbuqR9WVsgJ1ev/H5WPYbLNSq1LFftBhQcncsXxJKfCVi8lHwhmTZc+6NitHu5+LKH8elqCxtSjIOYjll1mCGbmB76ifsP/QAflCUARnhTPwTtatKgarslgk7DzV7PHjQVRSCf/UgPAknH93i7+eUvHTg+KR2d2uxvgQqpAG72sFVTW6cgSWvuB95N2tNjuqT9UjMIfZyy9Ddb+z9Z/6HrIqAb9GrwI++EwZsAQynn1ZTvG+3/jESDb26YRYx2v97vc3h143qDjqLYfhQW6PQF9Af+3tFkvyWHQkGMMMQ4s6QGgOpxT17eTosxxwNnizEFN8N7nQ7DzblivOMH0mCLBVcga6Q0bokwCdgCI1DFIR1GgG2scmmGtUpgJVl2h33kjS8zYYrhrcZ2w9ljwhiJW67adTdtz X-Forefront-PRVS: 031763BCAF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(39850400002)(39400400002)(39410400002)(39450400003)(39860400002)(39840400002)(377454003)(24454002)(43544003)(52314003)(83506001)(6486002)(25786009)(305945005)(53546009)(53936002)(189998001)(5660300001)(47776003)(33646002)(4326008)(42186005)(81166006)(229853002)(8676002)(77096006)(478600001)(4001350100001)(31686004)(6666003)(50986999)(76176999)(23676002)(54356999)(2950100002)(7736002)(36756003)(6306002)(54906002)(65826007)(50466002)(86362001)(65956001)(65806001)(6116002)(66066001)(230700001)(2906002)(3846002)(6246003)(2201001)(38730400002)(31696002)(21314002)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0153; H:[10.236.136.62]; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTJQUjEyTUIwMTUzOzIzOmVVaUxHT051MUFickJzbnZRMWpwVFRQWERR?= =?utf-8?B?U0Y5TDlhL25mMjFxSGs3R2g4SjN1ZVFjT3o5dno1MldKeXd0eEhsTmxSb2lD?= =?utf-8?B?QU1MUElyVDJDZTVNdE9NK25ZdmYydDhaVmZKTzREcGVJTlU0QVE0bUJUZWFv?= =?utf-8?B?b2VJMHNPVmg3MGwyT1U1dHNadkoxdXc0WmozVkQ2MXdXeC9SeVJ3MG1zYzRv?= =?utf-8?B?d2NDVzFnd0U2Y3gybXdWcXFGQ1BFejZqVGlLdy9WcUhaYXQraE5mWnlBU3hD?= =?utf-8?B?dnYrZTRjMnFMdGw1UUJObXBGdUhjZnErd3VKUG5tK2hQOFFnSUo5ZmxlM0NF?= =?utf-8?B?Y29ZWkhUQnQ2L2xodkltWSt0bnZLVzNXOGNyVTJnT0ZMODA0dlhQUzVYMHRu?= =?utf-8?B?WUZwK1EvcC82bmhsaC9Nb3h3QlNmTVVFWVU2NS9BVVBwZGJ4QUViRG03OHZU?= =?utf-8?B?MUpkaHlNdUo2ZTJHVzdRTGxWSTk0K0tUNWlUS3gzb1QvUjJh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tr7QMbkUaDe44SgVlak3NU/iNbHROm/XVxL7h+gfBjOS8seoN3rvRaWv3ObjuCneFo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2017 13:23:42.3993 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0153 Subject: Re: [PATCH v5 04/14] OvmfPkg/BaseMemcryptSevLib: Add SEV helper library X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 13:23:45 -0000 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 05/24/2017 08:06 AM, Laszlo Ersek wrote: > On 05/22/17 17:23, Brijesh Singh wrote: >> Add Secure Encrypted Virtualization (SEV) helper library. >> The library provides the routines to: >> - set or clear memory encryption bit for a given memory region. >> - query whether SEV is enabled. >> >> >> Cc: Jordan Justen >> Cc: Laszlo Ersek >> Contributed-under: TianoCore Contribution Agreement 1.0 >> Signed-off-by: Brijesh Singh >> Reviewed-by: Laszlo Ersek >> --- >> OvmfPkg/OvmfPkgIa32.dsc | 1 + >> OvmfPkg/OvmfPkgIa32X64.dsc | 1 + >> OvmfPkg/OvmfPkgX64.dsc | 1 + >> OvmfPkg/Library/BaseMemEncryptSevLib/BaseMemEncryptSevLib.inf | 50 +++ >> OvmfPkg/Include/Library/MemEncryptSevLib.h | 81 ++++ >> OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.h | 184 +++++++++ >> OvmfPkg/Library/BaseMemEncryptSevLib/Ia32/MemEncryptSevLib.c | 84 ++++ >> OvmfPkg/Library/BaseMemEncryptSevLib/MemEncryptSevLibInternal.c | 90 ++++ >> OvmfPkg/Library/BaseMemEncryptSevLib/X64/MemEncryptSevLib.c | 84 ++++ >> OvmfPkg/Library/BaseMemEncryptSevLib/X64/VirtualMemory.c | 428 ++++++++++++++++++++ >> 10 files changed, 1004 insertions(+) > > I have some comments for the case if you have to post a v6. Right now a > v6 is not needed just for these comments. > > (1) In > > I mentioned > > "Since this is a BASE library, please don't use EFI_STATUS, > EFI_INVALID_PARAMETER, EFI_NO_MAPPING, EFI_SUCCESS; use RETURN_xxx instead." > > You replaced most of them, but you left in "EFI_STATUS". That should be > "RETURN_STATUS". > > (2) please check the lines where you added (as I asked, thanks) > gEfiCallerBaseName and __FUNCTION__. On most lines, the indentation is > incorrect, relative to "DEBUG ((". > > (3) Furthermore, in some spots where you added __FUNCTION__, you forgot > to add a space after the comma. > > Again, no need to resubmit just because of this, but if you do resubmit > anyway, these should be fixed up. > Okay thanks, I believe I might have similar formating issues in other patches and if we do v6 then I will take care of them all. -Brijesh