From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (NAM12-MW2-obe.outbound.protection.outlook.com [40.107.244.67]) by mx.groups.io with SMTP id smtpd.web10.10268.1588610506209347730 for ; Mon, 04 May 2020 09:41:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=MrtR2aFf; spf=none, err=SPF record not found (domain: amd.com, ip: 40.107.244.67, mailfrom: thomas.lendacky@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dt4HY6WkpvSab81199MJJBBTSV17Z2SFKA8577ZJQGnhCgCw2vdGdIl9xNY7do/jF1XA0hEmovScPp+eu5ihDJ15oW4q6exa8veGgIUTt5N97owVGvSK9BRsYMSz1Op6UgXZGxLce48Mcj24ezAAL969kY1DqP+jI6uLux+zIRlZbA2A6o2KB3cfqzBTrHwUg29YY7oEcGqmppmzq0jzz5294LRlJcsuAYIn/Kf21vFZDjWIc+pgI+Eae9rLFcKcJTxoVfb1TZ1NNtMaF6HkKILnQe3NRXXig22rD09UUMB5fMpFdo2PW6KnTjMvqK9jexkLveCD4aMVaZov1bgdsg== 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=eFvVAjd7qtPDWvIuLbINPUHTCVSj3QAnMgNPYOyy4LU=; b=j7JD/wbYsO4hiIsGiNNbDctdYiMEvB96CtXHlmzYD0aC0mObsR9J/wXUeCtD/pIx0+D3T6uRlVJ6+feAjsMQSFjf7MQj0gpvFHOmSeZyP9xPS9kqJFpRIR/Vee+5kKfcQhtRFBp9yYlAgNbzwjF58Q/JooaDPL7AlR6xjOkJ9lmlEcOV9oRxilvr0mqm9kS198X5qlGcVXtAZm4ftK9sMt4dbjd1eKB996dkRHpfYOL/xIMACP8wUX0vy4FZiJsME0aRL/DMOCcou5uBZtawdKF4Y/WiBx3RiAVQ1efDUdIWBg8V38PV1+piCxCUikrlKzf6vSerQJfSUWSfWZhU3g== 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=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eFvVAjd7qtPDWvIuLbINPUHTCVSj3QAnMgNPYOyy4LU=; b=MrtR2aFfzYL+juoyAm3qR1OXDrgrecY/Mjl5755MOnqCfolco9bj/X0AvWrXd+tpms7+HSMQURuIuSnXRJr2CIrFY670YBz8M8tub/fWGFnwBZJ3kHr55oFl0YdEb/zajBMuVeiVDA+RXDSeB15L+g548La7yRqLW4bdwC2jhPM= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=amd.com; Received: from DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) by DM5PR12MB2391.namprd12.prod.outlook.com (2603:10b6:4:b3::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.29; Mon, 4 May 2020 16:41:44 +0000 Received: from DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::4ce1:9947:9681:c8b1]) by DM5PR12MB1355.namprd12.prod.outlook.com ([fe80::4ce1:9947:9681:c8b1%10]) with mapi id 15.20.2958.029; Mon, 4 May 2020 16:41:44 +0000 Subject: Re: [edk2-devel] [PATCH v7 01/43] MdeModulePkg: Create PCDs to be used in support of SEV-ES To: "Dong, Eric" , "devel@edk2.groups.io" Cc: "Justen, Jordan L" , Laszlo Ersek , Ard Biesheuvel , "Kinney, Michael D" , "Gao, Liming" , "Ni, Ray" , Brijesh Singh , "Wang, Jian J" , "Wu, Hao A" References: <3af2e4a8-fa4d-bb29-a282-c406ada7cf06@amd.com> From: "Lendacky, Thomas" Message-ID: Date: Mon, 4 May 2020 11:41:42 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 In-Reply-To: X-ClientProxiedBy: SN6PR08CA0036.namprd08.prod.outlook.com (2603:10b6:805:66::49) To DM5PR12MB1355.namprd12.prod.outlook.com (2603:10b6:3:6e::7) Return-Path: thomas.lendacky@amd.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from office-linux.texastahm.com (67.79.209.213) by SN6PR08CA0036.namprd08.prod.outlook.com (2603:10b6:805:66::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Mon, 4 May 2020 16:41:43 +0000 X-Originating-IP: [67.79.209.213] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: ba996ece-bc16-4514-a72c-08d7f04a07c8 X-MS-TrafficTypeDiagnostic: DM5PR12MB2391:|DM5PR12MB2391: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:167; X-Forefront-PRVS: 03932714EB X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ShMHdp+jelCEU77xT/XwBrMB1YbQXAiqjCiXAIujdIf3+r2zWiAmWr0R7dAo/rV/qnUvPfDIkCzT30CGPD6x/pmVQpoNpCn778jNxy/jaP5+GMmNAM44PUL7gmFkiJRmOQQOSjLlJfkEpq3vSOL7Pz9lKOr0IuwI2nzIB1R3GW48xaAy7O07NQfPVY1NqxNIwYbXSUTR4KR7aLmIUtKXePW+c0O4GUmpEq5REE5uGLlS10wTCmf3Z1q3GUds0XvrWSppgx5UfWxbdhgpf0V1ICcMmekrNXe43CT2A2mvJ8PDbMSt+nhP5eDHQPUyMuhzD3x1iSkTQ4VlB05JneMXH3HN1d02Yg9SfZ58ssK1tPgCLIYIR8IThoRfCQI2pkYBeDcLgqI4oHUTo3NYtWIIq235OFrHQ/z5KktyGSszLYT5uDkFnIAkkyKNcmIWlQfa62hVRyMi67ffp9VpnBwOlu3KAKJ5PT5PCTsRNEnNeX3UQ2zPeQ1d/9V8veeI2wwj5bzsISDsmN/7euL7qUG4kS94EpvxmPAZqk1zXDtarw+z7AHKx6b0r/2uvbZWinqZ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM5PR12MB1355.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(366004)(346002)(136003)(39860400002)(376002)(396003)(6512007)(6486002)(4326008)(66946007)(66476007)(66556008)(6506007)(5660300002)(186003)(53546011)(16526019)(8936002)(8676002)(26005)(956004)(2616005)(36756003)(54906003)(52116002)(110136005)(7416002)(83080400001)(2906002)(31696002)(86362001)(966005)(478600001)(45080400002)(316002)(31686004)(460985005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: tIp0/tWiYz1ZtGXy74vfbECtdEszX0SCbpnJaaZrXX+qbLkf5wHAaK1ZxYNZiqS0pCJOTr1Zf8QY/byN/Wqrl1FmfuP26739CbxXE2JZoDPmJ0irGd1WYtPkDROxijS4FA+f5u7a5vjs1OLEweJ1WiCjvx0T68I17ipobu85SAkRTgvs2rU5melx/lcLpEKh6CzGy2fWo6wzUS1UvwjIz51DKeTAk3w6/T6kZQm88veyQ71P0t+/KIxACyj++BD2d6BTQNwVeGRFaX9OObOWzgAJx68wV8UbZhNJYiaxDz296CNsEwcabtUHKzrdUc2iYPLVaoIfqFrMUUKn95mkL7GjSjlb/5ydTvjMMX9e7Jx2a2VLZDMA8NeSZxOMqCvHROfP2GkJojRV4hoytijhTr1Rfj1w709/GzFhFA7ISM6K6A1aT0M7jUvzgRnyBCKrwnKzajNRo5ytNqoTGcUehPH7IoJmA0XYq4nmik2YbUHfbRCo/d6akcZNexOJOw/YVZT9EV6pio9d3hJhlDTGA1i1tjwyaT708uAei6NC+c7YIlaFfXrDL/0vHCU4CBuSxHy8cMFAD5M61Funqu/tr/213jxNzJywtlM80tPufjxfdJiZmNT0Q8Hj7W1pd7v7lDEFPcT+8FdLnFHdYkZ3BQku6z72RbDqktn803jS19srmc7kzSAlxziwyPGbY6P3b6dp0mM/CAl6FT7F+rqevXZmrGv8BY1FODYYLWzr6dVC5yI8ztLzfPW0d2j/8JFRG+/mkhfZwpYvd06qExwZyHQczga60fRXssgG0iPtTIY= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba996ece-bc16-4514-a72c-08d7f04a07c8 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 May 2020 16:41:44.7330 (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: XQzgk8poo94+FcUbepQYvDI4wy3Zg6Yqt87uUij+aHvHjhLSI9FH6CxkDBP0mzmHREgiZ9Icl9pA0Wlksi/cAA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB2391 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit On 5/4/20 8:47 AM, Dong, Eric wrote: > Hi Tom, Hi Eric, > > Those errors are not the only errors I met. I also created a pull request to test your patch serial and it reported some errors. Please check the result, https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fpull%2F575&data=02%7C01%7Cthomas.lendacky%40amd.com%7Cfdf81d76452848b158f508d7f031c4b7%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637241968853099793&sdata=woq74igmxH5a%2F4vhphtseDjy%2BWil1kPDX0U8auU2Exc%3D&reserved=0. Is there an easy way to run everything that this link points, too? Is it just creating a pull request that does this? I don't want to take up a lot of your time, so if there's some documentation on how to run an integration test to find and fix issues like this, just point me to it. Thanks, Tom > > Thanks, > Eric > -----Original Message----- > From: Tom Lendacky > Sent: Monday, May 4, 2020 9:35 PM > To: Dong, Eric ; devel@edk2.groups.io > Cc: Justen, Jordan L ; Laszlo Ersek ; Ard Biesheuvel ; Kinney, Michael D ; Gao, Liming ; Ni, Ray ; Brijesh Singh ; Wang, Jian J ; Wu, Hao A > Subject: Re: [edk2-devel] [PATCH v7 01/43] MdeModulePkg: Create PCDs to be used in support of SEV-ES > > On 5/2/20 3:19 AM, Dong, Eric wrote: >> Hi Tom, > > Hi Eric, > >> >> Can you describe what tests have you done for this patch serial? > > I've built the OVMF package in 32, 32/64 and 64-bit configurations on Linux using GCC as the compiler. These warnings were not emitted in those configurations. I'll look into seeing if there is a compiler setting that will provide these conversion warnings. > > I don't have Visual Studio and so cannot test that. I can, however, fix these warnings. Are these the only warnings you have seen? > > Thanks, > Tom > >> >> I just build the UefiCpupkg. Dsc with VS2015x86 and met below errors: >> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64 >> \ArchAMDSevVcHandler.c(730): warning C4245: 'function': conversion >> from 'int' to 'UINT64', signed/unsigned mismatch >> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64 >> \ArchAMDSevVcHandler.c(745): warning C4244: '=': conversion from >> 'UINTN' to 'UINT8', possible loss of data >> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\ArchAMDSevVcHandler.c(753): warning C4245: 'function': conversion from 'int' to 'UINT64', signed/unsigned mismatch >> Trim --asm-file -o >> g:\edk2-open-source\edk2\Build\UefiCpu\DEBUG_VS2015x86\X64\UefiCpuPkg\ >> Library\SmmCpuFeaturesLib\SmmCpuFeaturesLibStm\OUTPUT\X64\SmiEntry.i >> -i >> g:\edk2-open-source\edk2\Build\UefiCpu\DEBUG_VS2015x86\X64\UefiCpuPkg\ >> Library\SmmCpuFeaturesLib\SmmCpuFeaturesLibStm\OUTPUT\inc.lst >> g:\edk2-open-source\edk2\UefiCpuPkg\Library\SmmCpuFeaturesLib\X64\SmiE >> ntry.nasm >> PeiDxeSmmCpuException.c >> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\ArchAMDSevVcHandler.c(778): warning C4245: 'function': conversion from 'int' to 'UINT64', signed/unsigned mismatch >> "C:\Program Files (x86)\Microsoft Visual Studio >> 14.0\Vc\bin\x86_amd64\lib.exe" /NOLOGO /LTCG >> /OUT:g:\edk2-open-source\edk2\Build\UefiCpu\DEBUG_VS2015x86\X64\MdeMod >> ulePkg\Library\TpmMeasurementLibNull\TpmMeasurementLibNull\OUTPUT\TpmM >> easurementLibNull.lib >> @g:\edk2-open-source\edk2\Build\UefiCpu\DEBUG_VS2015x86\X64\MdeModuleP >> kg\Library\TpmMeasurementLibNull\TpmMeasurementLibNull\OUTPUT\object_f >> iles.lst Building ... >> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuTimerLib\BaseCpuTimerLi >> b.inf [X64] >> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64 >> \ArchAMDSevVcHandler.c(801): warning C4245: 'function': conversion >> from 'int' to 'UINT64', signed/unsigned mismatch CheckSum.c >> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64 >> \ArchAMDSevVcHandler.c(821): warning C4245: 'function': conversion >> from 'int' to 'UINT64', signed/unsigned mismatch >> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64 >> \ArchAMDSevVcHandler.c(837): warning C4244: 'function': conversion >> from 'UINTN' to 'UINT8', possible loss of data >> >> Thanks, >> Eric >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of >> Lendacky, Thomas >> Sent: Thursday, April 23, 2020 1:41 AM >> To: devel@edk2.groups.io >> Cc: Justen, Jordan L ; Laszlo Ersek >> ; Ard Biesheuvel ; >> Kinney, Michael D ; Gao, Liming >> ; Dong, Eric ; Ni, Ray >> ; Brijesh Singh ; Wang, Jian >> J ; Wu, Hao A >> Subject: [edk2-devel] [PATCH v7 01/43] MdeModulePkg: Create PCDs to be >> used in support of SEV-ES >> >> BZ: >> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugz >> illa.tianocore.org%2Fshow_bug.cgi%3Fid%3D2198&data=02%7C01%7Cthoma >> s.lendacky%40amd.com%7Cfbe4f561e0234d8450fe08d7ee7186e2%7C3dd8961fe488 >> 4e608e11a82d994e183d%7C0%7C0%7C637240043676140655&sdata=xdnfAfSLtP >> i3FE5olqjU7%2B4OHJBxgOTRAFR0%2BMkECLc%3D&reserved=0 >> >> Two new dynamic MdeModulePkg PCDs are needed to support SEV-ES under OVMF: >> - PcdGhcbBase: UINT64 value that is the base address of the GHCB >> allocation. >> - PcdGhcbSize: UINT64 value that is the size, in bytes, of the >> GHCB allocation (size is dependent on the number of >> APs). >> >> Cc: Jian J Wang >> Cc: Hao A Wu >> Signed-off-by: Tom Lendacky >> --- >> MdeModulePkg/MdeModulePkg.dec | 9 +++++++++ MdeModulePkg/MdeModulePkg.uni | 8 ++++++++ >> 2 files changed, 17 insertions(+) >> >> diff --git a/MdeModulePkg/MdeModulePkg.dec >> b/MdeModulePkg/MdeModulePkg.dec index 42ad21cf244d..642a4791d83c >> 100644 >> --- a/MdeModulePkg/MdeModulePkg.dec >> +++ b/MdeModulePkg/MdeModulePkg.dec >> @@ -2048,6 +2048,15 @@ [PcdsDynamic, PcdsDynamicEx] >> # @Prompt If there is any test key used by the platform. >> >> gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00030003 >> >> + ## This dynamic PCD holds the base address of the GHCB pool allocation. >> + # @Prompt GHCB Pool Base Address >> + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0|UINT64|0x00030007 >> + >> + ## This dynamic PCD holds the total size of the GHCB pool allocation. >> + # The amount of memory allocated for GHCBs is dependent on the number of APs. >> + # @Prompt GHCB Pool Size >> + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbSize|0|UINT64|0x00030008 >> + >> [PcdsDynamicEx] >> ## This dynamic PCD enables the default variable setting. >> # Its value is the default store ID value. The default value is zero as Standard default. >> diff --git a/MdeModulePkg/MdeModulePkg.uni >> b/MdeModulePkg/MdeModulePkg.uni index 2007e0596c4f..2f8cca03e527 >> 100644 >> --- a/MdeModulePkg/MdeModulePkg.uni >> +++ b/MdeModulePkg/MdeModulePkg.uni >> @@ -1297,3 +1297,11 @@ >> #string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdTcgPfpMeasurementRevision_PROMPT #language en-US "TCG Platform Firmware Profile revision" >> >> #string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdTcgPfpMeasurementRevision_HELP #language en-US "Indicates which TCG Platform Firmware Profile revision the EDKII firmware follows." >> + >> +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbBase_PROMPT #language en-US "GHCB Pool Base Address" >> + >> +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbBase_HELP #language en-US "Used with SEV-ES support to identify an address range that is not to be encrypted." >> + >> +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbSize_PROMPT #language en-US "GHCB Pool Base Size" >> + >> +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbSize_HELP #language en-US "Used with SEV-ES support to identify the size of the address range that is not to be encrypted." >> -- >> 2.17.1 >> >> >> >>