From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (NAM10-MW2-obe.outbound.protection.outlook.com [40.107.94.68]) by mx.groups.io with SMTP id smtpd.web12.973.1632842612288227495 for ; Tue, 28 Sep 2021 08:23:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@amd.com header.s=selector1 header.b=WC50zMjJ; 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.94.68, mailfrom: brijesh.singh@amd.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=msuBx01glptph7pOfsSwDIpoM/cs2MZNik1NTVNPJXb9iasANTNarQGxGNxVYUHDIp4Er82ucMx51DymK9FguBpR9b5H1wEeE0uPR08reOmsHBAV8QX2BLyPbb4F9BpctQC5faz6s1oMY7RlqhdEVn2JW9yyXdF0+2OjmWZ7DLVPQNB5ZNMTnrwlRxRIBB+MT71c75aiinyUKf8ek7T+s7Oq09WpY/s+BoZ2zlcIZ0QjTNM66OrGq+Zg+uaT8aXfE3U4Jgk0aKRjIg9DZJ6CjgV6I7GgLF3kC9XSuBZKV1FOIaNWGBs2i0stSz2l9hNUr9ZYfwF2ZYi2SI4Z3d4QzA== 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; bh=ItxaHE5E9bBt49ge0kEq0yxrVhu4B8PKeJMQ962p+Z8=; b=lKCIAtZ2+N1GUN/NKJGUVaigcuV1F3upg10dMt5SibAWcwUC+X6/AThdsVA00VL1jUbrRo6w8Nwc3VeU1300U79qtrXIGswb9Vdmxz2gszm5KNi8/zpytGfAHiJeasWUvdvAaCuxT6btT3Zi0mTBlOqX4oNb2/GOrMeXidObJkXtxQduriYxApgFOP3wDBBJspm5eRJBKTmFd8nd0FrsPWoMxhpXHt2V625E3MMFyGUqTgaw2NW9XYaEEXCqlVIBIrSH0q5RNNcpDJEqpPrJI8YrbM264lhdsGmQv6mCrWg8PdG27I0b8o6OxKbq5uPaIcfpM6zRQ+przcl3PKf+Tg== 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=ItxaHE5E9bBt49ge0kEq0yxrVhu4B8PKeJMQ962p+Z8=; b=WC50zMjJaPIdJ9i/zA3Ik3nFxl+XOj20zcQ/vyGswsl6YtfyjAY1QNOBnG9FEObWhT3YcMcWGc+0sBhofmJU+7znnXOkWIVMNpz9AOqNNqpfoiWUa1Sdopbs7QWKmT34g0dsJYV9qh7G/zRmPPVOs7JnLKy/Vcl7NijsXRvz3W8= Received: from SN6PR12MB2718.namprd12.prod.outlook.com (2603:10b6:805:6f::22) by SN1PR12MB2544.namprd12.prod.outlook.com (2603:10b6:802:2b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.14; Tue, 28 Sep 2021 15:23:30 +0000 Received: from SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::78b7:7336:d363:9be3]) by SN6PR12MB2718.namprd12.prod.outlook.com ([fe80::78b7:7336:d363:9be3%6]) with mapi id 15.20.4544.021; Tue, 28 Sep 2021 15:23:30 +0000 From: "Brijesh Singh" To: "Xu, Min M" , "devel@edk2.groups.io" , "kraxel@redhat.com" CC: "Yao, Jiewen" , Ard Biesheuvel , "Justen, Jordan L" , Erdem Aktas , James Bottomley , "Lendacky, Thomas" Subject: Re: [edk2-devel] [PATCH V8 3/3] OvmfPkg: Enable TDX in ResetVector Thread-Topic: [edk2-devel] [PATCH V8 3/3] OvmfPkg: Enable TDX in ResetVector Thread-Index: AQHXtCNSdB6uiU2vQ0ekJsJiw16Adqu5Dp0AgAB+LVs= Date: Tue, 28 Sep 2021 15:23:30 +0000 Message-ID: References: <729034c8d47013be1e87a68ba1b6c3a7b79a4b2a.1632707635.git.min.m.xu@intel.com> <20210927084235.pj7x2agzzzjqz7be@sirius.home.kraxel.org> <20210928044254.kdqpd76ltmcllqkr@sirius.home.kraxel.org> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_Enabled=True;MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_SetDate=2021-09-28T15:23:29.446Z;MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_Name=AMD Official Use Only;MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_ContentBits=0;MSIP_Label_88914ebd-7e6c-4e12-a031-a9906be2db14_Method=Standard; suggested_attachment_session_id: bed75deb-897f-e8bd-a17c-1694648e501a authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 535d07d5-1154-427f-87f8-08d98293ed4c x-ms-traffictypediagnostic: SN1PR12MB2544: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 28nEL0g+mjjxjby/PHSL1/KtjmRCus9r7exascH/NxDQm04D/vMbzDQJ1d26EioKZ4YSBA6E9QhMiQ1eqcrtOMbUxk5Xo7b83/7E1W5EgJH/XSYaXQl9G8q+9fAGrbKW8+dmnkQO6MWgjc2o16bGNiGkLouKzlJ2Qw2Drgwh1a3Kzb2JTnhFJw672cz8/qysHd0+EAS2ByzP1ssxeE/mCPsObosXg3ws8/ugI8QUffjwe/AUmPQZLdH79Eiy23OE5Z3V5m2YnebrG0f41tB+JQ3FwxLq+ecjDlXGlrT5+5eQ50awc0TlumPJ3271f4Vo9hHCeFeLqG9UdLYXQuQmse+acNNrWMyByqgjBzgInZADPMz68HPK8e8rf/0OQOKZ4krnALujdkVWjCywiSe22qDxrbECMZKJeOx1iLOSCnowhMCE6123Yu6dnScB2AwitApQibmnPkw+xqwBlAdvXvqLjPfSRIZ428SspESP8/7ql1TPsx5O7qWx9NGKc3H6acW1OZ5yF7S5LY0ExXAr5dJPpNpus5jDFlVf51sGhmauVTETg0QKYBavJyXxcDpIIjzpeKv9Vu498fhMY/zWF3DwG3fNQDmbLfLnoFa9MQrEXlheCHqCJU3MiWAwt6HXV/UoupJ0w0gztXDMqoU2uGqn7GTpa+9knTvdq5uSR5M7/LPwzJL3BEb5Te0X7TeQV22FTTxP5BNUamSIziPEUF8hbbLVIFRLNnwZojPXu8W+JchPvKO1U5gpA8ynfYWwD+xH+3+wdc9GvRj8JDk904C83APAh8PD9AvsIoc5HgMAE5Kml78HnNSHqEEzvJxR x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR12MB2718.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(966005)(316002)(38070700005)(7696005)(26005)(55016002)(45080400002)(4326008)(508600001)(8676002)(9686003)(33656002)(166002)(19627405001)(8936002)(71200400001)(6506007)(86362001)(5660300002)(2906002)(53546011)(66946007)(66476007)(66556008)(64756008)(66446008)(110136005)(83380400001)(52536014)(186003)(38100700002)(122000001)(76116006)(54906003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2SBYon4foIWSpkiSGYLlEyfONZ/LXOw5pfw6JE5uDFgSxfBdyjIoKD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4uas7+by+PMIs6moR+nO9MB5x1CYvvYLk0damh7E?= =?us-ascii?Q?HLu3VVbnvuGLF9js/7+dsPirBz0gR8hMq8jd1cvXRnMuofU0ES2NxpGwN7Fv?= =?us-ascii?Q?0kzk9PMnxPN81uX1K+c/s7gpeG/BZCrU2wlwet1yfz3dYzCOqYIN805Z9mw4?= =?us-ascii?Q?Hu42TyoBvks8eu51YWPQmABBCBQmNeacWpqxcSfFJFgQMQfPpH0FLFpd4Ck8?= =?us-ascii?Q?t/4yTYLviz4W2WCUMWU05LQM+zXRBbSKG0dJXtGM8WLhJNtiOQNDJO9zFEvP?= =?us-ascii?Q?o5jkhAo7+6AtyqDdXkcPhmO4lgGOhEcWCLXqWLyBO84JEUixxWYIySMVJkIZ?= =?us-ascii?Q?jwy6rTIyFQo3mlPfSN/AP221Z4Qn5qmeF6/H6qUrrpa40EBAUxTa0gG0M6yj?= =?us-ascii?Q?Bw4=3D?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR12MB2718.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 535d07d5-1154-427f-87f8-08d98293ed4c X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2021 15:23:30.1585 (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: jh0rzS3M8rhs6udgAzQ0QVZ1GyMjpVwhc9dWFqRpNnqTYk3SMm7DilMcJKKZ3vOS26nHlWuGsBe+ZKDY08M3gg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB2544 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_SN6PR12MB2718B3F47A729D6DE37BD71CE5A89SN6PR12MB2718namp_" --_000_SN6PR12MB2718B3F47A729D6DE37BD71CE5A89SN6PR12MB2718namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [AMD Official Use Only] May I ask to use the OvmfMetadata instead of the of TdxMetadata for the Gui= ded structure name label (same as what I did in SNP series patch #4). If yo= u can send the metadata introduction as a patch separately then add the TDX= descriptor in TDX series. I can try to make it work for the SNP series and= add SNP specific descriptors. Additionally, I think you want to provide an= absolute offset for the start of the metadata instead relative value so th= at VMM can very easily reach to the start of metadata. e.g +OvmfMetadataOffsetStart: + DD (fourGigabytes - OvmfMetadataGuid - 16) + DW OvmfMetadataOffsetEnd - OvmfMetadataOffsetStart + DB 0x35, 0x65, 0x7a, 0xe4, 0x4a, 0x98, 0x98, 0x47 + DB 0x86, 0x5e, 0x46, 0x85, 0xa7, 0xbf, 0x8e, 0xc2 +OvmfMetadataOffsetEnd: For SNP series, I will 3 section types #1 CPUID, # Secrets, and #3 SEC_MEM = and will probably add a total of 3 more descriptors. ________________________________ From: Xu, Min M Sent: Tuesday, September 28, 2021 2:35 AM To: devel@edk2.groups.io ; kraxel@redhat.com Cc: Yao, Jiewen ; Ard Biesheuvel ; Justen, Jordan L ; Singh, Brijesh ; Erdem Aktas ; James Bottomley ; Lendacky, Thomas Subject: RE: [edk2-devel] [PATCH V8 3/3] OvmfPkg: Enable TDX in ResetVector On September 28, 2021 12:43 PM, Gerd Hoffmann wrote: > Hi, > > > > Can you move the metadata changes to a separate patch please? > > Yes, the metadata changes will be in a separate patch in the next versi= on. > > Can you also add a comment block documenting the format? Not only those > parts which are used for TDVF, but everything? The description in tdx-vi= rtual- > firmware-design-guide-rev-1.pdf seems to be incomplete, specifically the > option to use the table for TD memory allocation (as mentioned by Jiewen)= is > not covered. And possibly there is more which is missing ... Sure. I will add the comment in IntelTdxMetadata.asm to describe the format= of Tdx Metadata. Here is the PR I would send as the next version. https://nam11.safelinks.pr= otection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.com%2Ftianocore%2Fedk2%2Fp= ull%2F2018&data=3D04%7C01%7Cbrijesh.singh%40amd.com%7Cf49ea5bc7d79474e5= 72108d982529cbd%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C63768411359027= 3535%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik= 1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3DbGOxYMIKtHYKhcfk0Wt4qoIgiz3b9DM%2FA= D%2Fui3ByVrU%3D&reserved=3D0 You can have a preliminary review if you want. > > thanks, > Gerd > > > >=20 > --_000_SN6PR12MB2718B3F47A729D6DE37BD71CE5A89SN6PR12MB2718namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

[AMD Official Use Only]


May I ask to use the OvmfMetadata instead of the of TdxMetadata for th= e Guided structure name label (same as what I did in SNP series patch #4). = If you can send the metadata introduction as a patch separately then add th= e TDX descriptor in TDX series. I can try to make it work for the SNP series and add SNP specific descriptors. A= dditionally, I think you want to provide an absolute offset for the st= art of the metadata instead relative value so that VMM can very easily reac= h to the start of metadata. 
e.g

= +OvmfMetadataOffsetStart:
= +  DD      (fourGigabytes - OvmfMetadataGuid - 16)
= +  DW      OvmfMetadataOffsetEnd - OvmfMetadataOffse= tStart
= +  DB      0x35, 0x65, 0x7a, 0xe4, 0x4a, 0x98, 0x98,= 0x47
= +  DB      0x86, 0x5e, 0x46, 0x85, 0xa7, 0xbf, 0x8e,= 0xc2
= +OvmfMetadataOffsetEnd:

For SNP series, I will 3 section types #1 CPUID, # Secrets, and #3 SEC_MEM = and will probably add a total of 3 more descriptors. 


From: Xu, Min M <min.m.x= u@intel.com>
Sent: Tuesday, September 28, 2021 2:35 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>; kraxel@redhat= .com <kraxel@redhat.com>
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Ard Biesheuvel <ard= b+tianocore@kernel.org>; Justen, Jordan L <jordan.l.justen@intel.com&= gt;; Singh, Brijesh <brijesh.singh@amd.com>; Erdem Aktas <erdemakt= as@google.com>; James Bottomley <jejb@linux.ibm.com>; Lendacky, Thomas <Thomas.Lendacky@amd.com>
Subject: RE: [edk2-devel] [PATCH V8 3/3] OvmfPkg: Enable TDX in Rese= tVector
 
On September 28, 2021 12:43 PM, Gerd Hoffmann wrot= e:
>   Hi,
>
> > > Can you move the metadata changes to a separate patch please= ?
> > Yes, the metadata changes will be in a separate patch in the next= version.
>
> Can you also add a comment block documenting the format?  Not onl= y those
> parts which are used for TDVF, but everything?  The description i= n tdx-virtual-
> firmware-design-guide-rev-1.pdf seems to be incomplete, specifically t= he
> option to use the table for TD memory allocation (as mentioned by Jiew= en) is
> not covered.  And possibly there is more which is missing ...
Sure. I will add the comment in IntelTdxMetadata.asm to describe the format= of Tdx Metadata.
Here is the PR I would send as the next version. https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgithub.= com%2Ftianocore%2Fedk2%2Fpull%2F2018&amp;data=3D04%7C01%7Cbrijesh.singh= %40amd.com%7Cf49ea5bc7d79474e572108d982529cbd%7C3dd8961fe4884e608e11a82d994= e183d%7C0%7C0%7C637684113590273535%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw= MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3Db= GOxYMIKtHYKhcfk0Wt4qoIgiz3b9DM%2FAD%2Fui3ByVrU%3D&amp;reserved=3D0<= br> You can have a preliminary review if you want.
>
> thanks,
>   Gerd
>
>
>
>
>

--_000_SN6PR12MB2718B3F47A729D6DE37BD71CE5A89SN6PR12MB2718namp_--