From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web09.5023.1632468758030224012 for ; Fri, 24 Sep 2021 00:32:38 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=Sx211q7O; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: jiewen.yao@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10116"; a="203515897" X-IronPort-AV: E=Sophos;i="5.85,319,1624345200"; d="scan'208";a="203515897" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Sep 2021 00:32:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,319,1624345200"; d="scan'208";a="559069220" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga002.fm.intel.com with ESMTP; 24 Sep 2021 00:32:36 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 24 Sep 2021 00:32:36 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 24 Sep 2021 00:32:35 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Fri, 24 Sep 2021 00:32:35 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.45) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Fri, 24 Sep 2021 00:32:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TJ8pRsVR0IuS7a5yD+My7e3GWdmYpoGprPgNJtzVBW+1ZlOODBdfUknf3b67CfwVt2PuZ+JXTJIL9yqFd72t7TYEfMWEcphJZmTXrcFua8F1SDNSeoq0B8xN4dToTao9wfAtqjOjIDUST1uf9lLItNYL83FrjXfarCqmslZY1r1mYYveVbD/DXLjPRNd1YtmZNa1OUBBh85JZJ5Vd8HPPEFH1OLrruub48XSbUahVLH8qTjGcZxakMS+DzRdaDLaAETOiL0TytofgIgG1H8aGvu7Dlab31qVO8RNPETLaEXkjj0Fi+IuwX+0hC7wEwexf0H/WaHS5HWGwgB0EjNImg== 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=FX8enPJs7/z9Qn+edEz9xfzYdyakvSUn5DQYnoRJyXM=; b=g5VCNB0jntwLZAkrsZHyYIg4qdsRrZplW2fZqZjKF3IaNhWf2xbXl+hv/mRvkEtDqHF/SM78PBLAzM2QVLVryy6PqJzGADGtlzPfpzzFC4ET68LVtK09BGEJJNQSnu5bRmcemn8ETryIc+w/bWNxp+QhKHF7FiJ8O39jGm8hy5m3c16juGsDboj7TJEyALl6Zul2uCHD10DPneFjSNJkzbb7pWI2qL9HL27JhaXGA/CEUpoDicodcPxPDM4aRTMo4rJ/h90H4d1jh/xzwkCXPN6K3sGBTKbkHYbze7DbPR0z95BGm99FwBZ1kw7jF8pVW4VKLMfUwuTUSa+ieCx7fA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FX8enPJs7/z9Qn+edEz9xfzYdyakvSUn5DQYnoRJyXM=; b=Sx211q7OwigGeCOInLbqIesjc6CfMQdv6DhaHBFdKTZKbum49hIYP4ME8C5lrSjR+Tv38oS2pUo3nun6+aBwJWkK3PqPRDf9FwlZyD136cQo+KpSQibRgNnjJ6LRIUn8sLp1hPLV4QnLut1eJxTyB7QgNF5i/1m5T378+HW8SRo= Received: from SJ0PR11MB4894.namprd11.prod.outlook.com (2603:10b6:a03:2d4::5) by BYAPR11MB2693.namprd11.prod.outlook.com (2603:10b6:a02:cc::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Fri, 24 Sep 2021 07:32:33 +0000 Received: from SJ0PR11MB4894.namprd11.prod.outlook.com ([fe80::f54c:e846:c8a8:9dc4]) by SJ0PR11MB4894.namprd11.prod.outlook.com ([fe80::f54c:e846:c8a8:9dc4%8]) with mapi id 15.20.4544.015; Fri, 24 Sep 2021 07:32:34 +0000 From: "Yao, Jiewen" To: "devel@edk2.groups.io" , "kraxel@redhat.com" , "Xu, Min M" CC: Brijesh Singh , Ard Biesheuvel , "Justen, Jordan L" , Erdem Aktas , James Bottomley , Tom Lendacky Subject: Re: [edk2-devel] [PATCH V7 1/1] OvmfPkg: Enable TDX in ResetVector Thread-Topic: [edk2-devel] [PATCH V7 1/1] OvmfPkg: Enable TDX in ResetVector Thread-Index: AQHXrsfv6qwUC8Li5kiwlPdQeu+jg6uvry6AgAEZ5ACAAIjkgIAALkqAgAAWigCAAAcDAIAAA09wgAAI9ICAAAMxAIAA/y2AgAAh1oA= Date: Fri, 24 Sep 2021 07:32:33 +0000 Message-ID: References: <12721dade1f2f9905cc34271d9abec24650442ff.1632214561.git.min.m.xu@intel.com> <20210922074929.e5iwf24t6wyndgbu@sirius.home.kraxel.org> <20210923084821.yxizus3loa2p6hms@sirius.home.kraxel.org> <7c9aeb95-5c33-bd8d-4f0c-40133f4c7c3d@amd.com> <20210924052825.2qljhtvweonbov5q@sirius.home.kraxel.org> In-Reply-To: <20210924052825.2qljhtvweonbov5q@sirius.home.kraxel.org> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.200.16 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c21076f6-0aa5-4ca1-e2d2-08d97f2d79a5 x-ms-traffictypediagnostic: BYAPR11MB2693: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: o/I1DU+taYJdSaYIn/Lk04UPym2UAnbiWYqF/vRpqasxBCnh6YLPxI1h7CHWxUfD5qzgft/8v02pfNoNajLnYenPYWs8qvLnxboBj+tzm+hDZ1h8uh32zfgCp5HpzPy+XmT34qiRt86rw7DkeUDE+5gUF9oyvpxpjtHwr/u0SAZ1Cu3Ls1i6PwaTyrRZpmjCUCrlHkifBXkkro7fS9oLbkCx15Fy1COzlQQBNlRZT1Tt/FpMRyUIIV1y4Xyu2AFFilDca8FTiNvW+dV2UOFaWGisIxMk7QuLFF4UAZK+5pxpmH0phxP1iDwt4vzudzAXOnjIvN3smbx6vxVo/57pEaP9UwiGbYLSyII4T7FPGqPNWkhqpAkCT6ERiYIx+YA63E900rQn9rfQxm56Dsaq/SJq6zd0UC+8cdHjNvwNjlb+IZHZ3NEvGuG8AY6GPgwUSGnRx5mFaH/vDRMgioCeQzxnc/RzpluFDUaJJ+5mCzVgaUNgUU4h4pP/lrYIClBpAd6RJjoDZ1AGSIl7Q0IPBk/B88846eAENC3ry+ScSHkXObO9vfzbtnfFqjCFbGunwbzrKE0BIuwHd7fboJmQQ/icsqb4hF30+kh9OweD25Iv/V53UGZae/MZ3f5UpmqLrrTpmdeuQFLVvTL+MMm8fmb9nYEDDBqP1dToe9wYStq3IzKpJLZzCuCrIogrBiPFXW48srF9klNFwUKs7rH4dR/Y1pgtH/BBZa/FXYmRVjEk9geVtdTPrKpMzGDOm7S6e8RcKdPchvdchgbj+G5FBPXXf7cH40PbCzjPTG+yHhglsdrOiAA41E3fUuQhX/nqNSYLuinyud54QGV3cXrKQw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR11MB4894.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(6506007)(66556008)(5660300002)(316002)(508600001)(8676002)(76116006)(8936002)(66476007)(122000001)(4326008)(66946007)(86362001)(52536014)(64756008)(53546011)(66446008)(55016002)(26005)(33656002)(966005)(38070700005)(54906003)(110136005)(7696005)(2906002)(38100700002)(9686003)(71200400001)(6636002)(186003)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Uk4cOCvschifdVI/J0Hy6rmemh0G3AOfGz9+zwcVt7rOBTlXOTqwT//dT4/b?= =?us-ascii?Q?xeLtt4W7A8R5oc0Q86RcfZ0paGMQ3sJh5vaYZ1utUSHKy1x2oWARf1UZvXGe?= =?us-ascii?Q?CdeO4AtZ2rGWTTXaGOtcvQvgfu7IJkFYfwpXfXAB+a3301OQsUC0fs+s+qRZ?= =?us-ascii?Q?rfOK03SFI5Hvw1NKq2gw1okC/Iu6R1XKToaGlA7rIGB9MtzhjryxHMpc1cjT?= =?us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z8yazh5LG3L7A8zSYQd26X9uUe?= =?us-ascii?Q?zJqUKh4y1jRYvzV29y0WpRWkyRC9gfTSzNykkFfnr8e+8bwIMXE4vq/HyWm7?= =?us-ascii?Q?m+wgduvS3FjoLXtWJ4vLHv4xhLDvhnFdFNk9YiW/7/Ta15daCjYb2+DSDmJb?= =?us-ascii?Q?xjg7VBTyQL+1c+Sq82bJ/yVUFEMY8QDnPEkT6yp1R2zFuY+pN0Ld4jwEkLJO?= =?us-ascii?Q?3UA3Hq91boMg5VwcZ+Oy6h5K?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB4894.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c21076f6-0aa5-4ca1-e2d2-08d97f2d79a5 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Sep 2021 07:32:34.0039 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ImqcPnmvT/AkbTzdovNKbK7rHeXJ1uhHGjxNJbg+ZVvnVZVRBZPXM7H4msfSa92jhNdD+XFFKoHUicxKzq7lyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2693 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Gerd Having config-a and config-b is proposed by original RedHat rep in EDKII - = Laszlo. We reach the agreement to separate those 2 configuration and AMD SEV is tak= ing same approach. Are you saying you want to reset the high level plan and unify config-a and= config-b into one binary? Thank you Yao Jiewen > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Gerd > Hoffmann > Sent: Friday, September 24, 2021 1:28 PM > To: Xu, Min M > Cc: Brijesh Singh ; Yao, Jiewen > ; devel@edk2.groups.io; Ard Biesheuvel > ; Justen, Jordan L = ; > Erdem Aktas ; James Bottomley > ; Tom Lendacky > Subject: Re: [edk2-devel] [PATCH V7 1/1] OvmfPkg: Enable TDX in ResetVect= or >=20 > Hi, >=20 > > > SEV hardware does not have a concept of the metadata. To boot SEV gue= st > we > > > need to pass some information to VMM and in past those information we= re > > > passed through SNP_BOOT_BLOCK (GUIDed structure) but Gerd > recommended > > > that it will be good idea if both SEV and TDX uses a common metadata > approach > > > to pass these information. I personally think it was a good suggestio= n. So, in > SNP > > > series I went ahead and created a generic metadata structure and hop= e that > > > TDX will build on it. The user of the metadata structure is VMM (qemu= , etc); > > > while launching the guest the VMM knows whether its creating the SEV = or > TDX > > > guest and will process the entries accordingly. > > > > > > As per the number of fields in the metadata is concerns, I felt 3 fie= lds (start, > size > > > and type) should be good enough for all the cases. There was a questi= on > from > > > Gerd to Min asking why do you need the dataoffset/rawdatasize etc and= I > don't > > > remember seeing the answer for it. > > > > The discussion is in this link. https://edk2.groups.io/g/devel/message/= 80289 >=20 > The question why TDX_BFV_RAW_DATA_OFFSET and > TDX_BFV_RAW_DATA_SIZE are > needed and why TDX_BFV_MEMORY_BASE + TDX_BFV_MEMORY_SIZE can't be > used > is still open. >=20 > While being at it: The question why "config-b" with a completely > different initialization code path is needed is still open too. The > tdvf design guide is not helpful here. Although explains what is > different in "config-a" vs. "config-b" it does not explain the > background, i.e. why some features are supported by "config-b" > only. >=20 > And I guess these two questions are related. With "config-a" there is a > fixed offset between TDX_BFV_RAW_DATA_OFFSET + TDX_BFV_MEMORY_BASE, > so > if you know one of them you can easily calculate the other. With > "config-b" this is possibly not the case. >=20 > So, can you please shed some light on this? >=20 > thanks, > Gerd >=20 >=20 >=20 >=20 >=20