From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.108219.1671034776417291138 for ; Wed, 14 Dec 2022 08:19:36 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Oy1S0Ze8; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671034776; x=1702570776; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=aXs6iiPwsBaeAPvt9XAjhDN6BncDkEbAO4nxfrw1VN4=; b=Oy1S0Ze8Fi8bngJJGn1sDMLoxScbsWwlqYor8wdBcqAlZTQO18XpOFQr 11tX650QpvyNWuBfZJCxddaPcSEP6D2XzQsXFZc0JScMTU28s068NmOFq iLuwCyvrZ12EvxVkR2dIJTIr0zNUESoUGi37xQTwodp75i92CjInauChE ESmxTvc6YrnOIJCglFH6oNOL5snI1/LJX6eJv0t1FcV6rqicdxaiEq0cX VkgrkwPmj36VFGgcIZbSbLSw+BI6NejKb1Q34SFzS2aplXv4uxnMmpyQg cW3aJCmsbfwYpEJoFTTahHFurR1qyVpQe/aR2j4TzBKj482fo+IX6SKIX g==; X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="317152985" X-IronPort-AV: E=Sophos;i="5.96,244,1665471600"; d="scan'208";a="317152985" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2022 08:19:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="791346350" X-IronPort-AV: E=Sophos;i="5.96,244,1665471600"; d="scan'208";a="791346350" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga001.fm.intel.com with ESMTP; 14 Dec 2022 08:19:35 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 14 Dec 2022 08:19:35 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 14 Dec 2022 08:19:34 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Wed, 14 Dec 2022 08:19:34 -0800 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.49) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Wed, 14 Dec 2022 08:19:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C4gJEzMzQ3OYAMNYPj1lD7COp/fEwVocY9ib60QDrgu085ZxssTMtbKgxpWE9pkY4kuWsL0EgmlpdVWyk43asZWaSKCKKVWj0oS4PBmGEdWXkgq06Js4nZMwHOT10RnGirl+deIlVH6UL7z655PecpHle7tJV0F7gzkqLMPQJxT1yeS1qvxjBjjXPArDuQiWmarHSwqFN3EgjgRqDXjO24icgh8JrzS57UcPBvrM/RgKzom0wHfyqHNpQe0X9iFlR/2caYKh8OVOjmYCWMY5mXCodMbQWJlkCpxpQBZxMxX22JDgKdEerp6pUCxssZbV1nCXLfiwRBsYezL3r34tHQ== 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=HqDCPaMkl9qU5YsWYfxR0QN1EpIzCs6CMGkk6tH5VDU=; b=OLuV+jB4z8FpV1VYjMnCQ8BikhUjA+rZyoWoiq2ZLePs8QeiU37XYq5Ag/sFcrM2NS0G2VYGwS0Hg0hXHo3LDC18Hx/oBS2bn3AZoXeiF4xIz7kby2/Qoql4L1qfKLzZcSRKHQucppta7FP/SQzFzDzNZraNgPz766o+kJNSGDlMoAaa31H4j8TgbYb64BbNLls0M8iolG4vice+oR9zyfEF6pbFBQuAEoFU73IUUsrieghLzuJoHMoLo6jLKVnGWE3hSrYzQRWOCMwazw32c3GITt6Vp86TG8q5cWaQ1xptvmyTgQ4EkbKrr8Yf8Y7TB38saiTieQj6CPR3jCgGiw== 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 Received: from MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by SA0PR11MB4621.namprd11.prod.outlook.com (2603:10b6:806:72::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.11; Wed, 14 Dec 2022 16:19:32 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::5f56:1bdc:2eae:c041]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::5f56:1bdc:2eae:c041%9]) with mapi id 15.20.5880.019; Wed, 14 Dec 2022 16:19:32 +0000 From: "Yao, Jiewen" To: "Boeuf, Sebastien" , "devel@edk2.groups.io" CC: "Xu, Min M" , "kraxel@redhat.com" Subject: Re: [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor Thread-Topic: [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor Thread-Index: AQHZDgisGR7Oa8ZK0EGYPTCgVsrqdq5tk45w Date: Wed, 14 Dec 2022 16:19:31 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|SA0PR11MB4621:EE_ x-ms-office365-filtering-correlation-id: d98cdea2-05c1-43ac-403d-08daddeefba7 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: s8x4P23cDJkAprDSpnaKFK41nM1CSKYVskSA1UGjGLhg0WnkcOqK+cjy8yAfW62acQlbK9kH8GcaWrZl9DG9yuLWXAskg0BDbYIcSk0odEqb5G8AXsVL0ziUODKed4KBiVmv/VR4eY5cGNp51Weoo4bPJBp0u+F033EdWMQbqNIE1FkvZQl+5nmSZprbbzmtr42MtaMnRI3Uwf59nAvZnfD1AHotmFa6Bh5+2SCuKr7IP3SY45yfpd3RB0C2kHXYhWBJbK9NiE/W5DbVJqho8mpDdGq5eWCmZFw1wgsVbHLN5efrm5Q10eXmwtJHdCsI+wk+Y+cnsAZHgFMXoyTSODIqAuozzfwwCmpyMxetWF68KlCw9abJwy9SJuYyL8pnHBY/nH8jBl1FBbjuz74EA7azjwDLGpxE8fIz2h2up7TeDYuPz587g9+O8kmX/F0Gqqfi075BRwPSh8kB1+TSIx4pWp2IAFP+ZSXBQ/F4IRmgds8rq4Rrckrmtxdh4eXv55c1UPO2SPRRY20BXbsjCodaLVAJlof1Qen6IOKXS8p/v4t25N9Jne/kkN1LV2/oLq3iLLpv5BeRiPf8YZwRjXHxOYXtE1+F26sPSZ3dUG3P3xR2e6ggfCWa32ejQSk5PlDfqYWJQ1LPFWodX1p17A5DpPVyTEiHc1GMsttqL0ni0F1UEJyuw1dRKYgIU8girnyEvkDWxCEbKSA88YG/DA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39860400002)(136003)(376002)(346002)(366004)(396003)(451199015)(71200400001)(33656002)(55016003)(86362001)(76116006)(64756008)(66446008)(66476007)(9686003)(66556008)(66946007)(8676002)(26005)(186003)(52536014)(41300700001)(4326008)(478600001)(6506007)(54906003)(7696005)(110136005)(53546011)(316002)(122000001)(38100700002)(38070700005)(82960400001)(8936002)(83380400001)(2906002)(5660300002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?2kEvfu1qujMgykzjWFwuB5NwYgwNDr/oi/zZ6NpFwQfe1uQabbC5Pff1JKEh?= =?us-ascii?Q?cw/k/eZA22wGfpNwGPt//aEz8aaZLwAIPjTRFcsnJ/ZPru41/GMVk854TkHF?= =?us-ascii?Q?+PAOponaOGZ/6QorA2RWH4qsvcco/oAV7mo38tHFrIoHfQPubNsTFfYpcXbs?= =?us-ascii?Q?tevbrjpakD/3Hi1H9BUSM9ANwOs9L/m01xXQV2rUbIG8HuQuKmx5ew2mNAfd?= =?us-ascii?Q?rxoJTITioCHi0B6rENO5ggtr+kciwWF5jWiWeUWb57W76I58Su3Z6kKOwDEK?= =?us-ascii?Q?5z5bpoTpZmJERllvh7Gk66BJzzbqyAWKdYO0LHQagyvsmdXaq1jPDI5kFmLZ?= =?us-ascii?Q?0WVsY+L/6MAG7i5qr79d5+HobJy6IebYHx2uM5B1EZxhimNU4MVEHkBvIju8?= =?us-ascii?Q?BEOsRPqecPsJEik2GiJ1HEwm9PCQJ3PQ/SLDezeO8haUhsfAD9MWuk/mJWvg?= =?us-ascii?Q?oTV9m8ii7cocHYZ89IrIr4pZTv7B9TOWdZsBD4pX+NVDahuXrJ3fKoUwtJPH?= =?us-ascii?Q?FKQjyjlfUYTsVIaoJx4DAdTcIqZUBNVZJKun9pWH3E9dgtqmxtE74+dlxtdp?= =?us-ascii?Q?ND0p6lQEZNdO0k+eNl71UltDY2JauUe4WoNjmZ1lfxNx1jKUPOudwVZy9jCq?= =?us-ascii?Q?Y8UPHiTn+paOIsWwee+GUp55bTm4VX84Z6dYpJJpi1QZuq+d2EbkH9HRElAa?= =?us-ascii?Q?dt+Laf35JhCWchV6PLxSMF64NyzKwQamjNDWymsTlVa59LkdrpCWpSEoMknr?= =?us-ascii?Q?gotmuKUQ/ObAE61qiKs3ohZR/g5EJHRZmk9HBZHR9rUIoFswU+LUliGavlvB?= =?us-ascii?Q?etxirkb3jQE+dps9Os9KBU56klfFqBxH4X89a0iA6ujV4Bez12z25Z3R3jKI?= =?us-ascii?Q?R6jMv7MtX5ycstr2t80STHLJrFlAVb9ePPCmghdT/ACwUjPQOTsbQABKsmRG?= =?us-ascii?Q?wcirsQ/fJV9npGgw+Gq80F/lMs2att6wFRtEWW+0TCpLSn9L06eS3IpWn0h3?= =?us-ascii?Q?eyHb24qfE28nOs9157Gv8lNSZdsPIAa800R5N8Q18OZI8MEwtTq0aMjjYVus?= =?us-ascii?Q?eo4C33TlDZWZMfLbyzd+C+G4iDLKOse7m1VadvILN45Yl1l7Yz+pwm1voopj?= =?us-ascii?Q?zBQalrKIz2pvU4iuSKUXkYm4h84hQH8TTvVvbNWRieHDasxCMsHOilX6s0Pj?= =?us-ascii?Q?w83dl1XOYXVj762FK61gofws6gkkMoVjDYGhqjSFeMwouKCuedsgcDfCUxo+?= =?us-ascii?Q?qmQCFYJRbFn+A0e6woDqLdhecu4g/F8yh+t7Tvn0WNIOk/Av0lDsm/p+ZwwA?= =?us-ascii?Q?2BA1HrWQVmv7IdAGuXgG2m8tnn3GkcQTNCY3gMtFmm0OQ5fhd1qXUZFXAELj?= =?us-ascii?Q?WGxLfhf7uoWhwJgSsJ3vPmnPgMKsZ56MNnCvmkRCfjLKr8zo5SsPnlFhc723?= =?us-ascii?Q?bLNRoSaiza3/TwyvZsHBIz+Y+X+0Taah1DkVgdOA3Y0l/L+XDryanYMTlS98?= =?us-ascii?Q?PWumyGTDVKY9kDQIEd7vc5VPbWwjQecBZsWuh09W/HWEiqo98XzNDCFo5gSG?= =?us-ascii?Q?ESWG0NrVcfPzS836hiZgYyOP5DVavmFr9aSGsJcJ?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d98cdea2-05c1-43ac-403d-08daddeefba7 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2022 16:19:31.9874 (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: sqMcZZSAbkmvKHn/yL6R6g0ExOAJBydJqsmd0MfZKQQPzYOPYiVZF+178phZlNxrrep7kso34/YdW6vchvzpng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4621 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 Reviewed-by: Jiewen Yao > -----Original Message----- > From: Boeuf, Sebastien > Sent: Monday, December 12, 2022 5:04 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Xu, Min M ; > kraxel@redhat.com; Boeuf, Sebastien > Subject: [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor >=20 > From: Sebastien Boeuf >=20 > The IntelTdxX64 OVMF target wasn't working with Cloud Hypervisor on TDX > platform. This was due to the way the OVMF code expects Cloud Hypervisor > to rely on PVH to retrieve information like memory below 4GiB as well as > the ACPI tables. >=20 > This is why this series takes care of identifying when running on TDX in > order to handle things differently. For the memory below 4GiB, it falls > back onto the CMOS to retrieve the correct information, and for the ACPI > tables, it relies on the HOB to obtain every table individually before > to expose them to the guest OS. >=20 > With these two use cases properly handled by this series, it is now > possible to use the IntelTdxX64 target to build an OVMF binary that > works both for QEMU and Cloud Hypervisor on a TDX platform. >=20 > Sebastien Boeuf (3): > OvmfPkg/PlatformInitLib: Differentiate TDX case for Cloud Hypervisor > OvmfPkg/PlatformInitLib: Transfer GUID Extension HOB > OvmfPkg/AcpiPlatformDxe: Differentiate TDX case for Cloud Hypervisor >=20 > OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c | 8 +- > OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h | 6 ++ > OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 2 + > OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 87 +++++++++++++++++++++ > OvmfPkg/Library/PlatformInitLib/IntelTdx.c | 5 ++ > OvmfPkg/Library/PlatformInitLib/MemDetect.c | 4 +- > OvmfPkg/OvmfPkg.dec | 1 + > 7 files changed, 111 insertions(+), 2 deletions(-) >=20 > -- > 2.34.1