From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.8576.1671180397438382043 for ; Fri, 16 Dec 2022 00:46:37 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=lWW9lKg1; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: sebastien.boeuf@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671180397; x=1702716397; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version; bh=rvJGJwYMxSn3HmNbklvviJGJ5DdnpxMRX2RZNuiN2fc=; b=lWW9lKg1slTK6wBkC42FjMuSdQlPglRf8n6tE+KHFF1A+a6EJgjgRu45 hxTyq/LKy1T2rA2jg3zJ/zEUQjJDDCI8Mq3CPTi+CPaj4MK+ZTq0qvoea kKnk5ko+FjDYaDbKCQc1IuSPMfB8NiNyTFQOH3G6MgPZdal9/aZrO47Gs L/Z7nRsqKkZ9m449tYZEZPWqUcOvsqSEBCWDxAVuF7puRxNLrFMRBgEjP 1nCrMcVy2FG6DBhQoTvEiZ2MSr1PV86CXMn1TQP/fG11c0FXL7KpwZKCW 5SkHko0nwqRiWDdbtfUkHr8wLM/MrskJZTnXpeNqohJxVc48vBo6jHqoX w==; X-IronPort-AV: E=McAfee;i="6500,9779,10562"; a="299259995" X-IronPort-AV: E=Sophos;i="5.96,249,1665471600"; d="scan'208,217";a="299259995" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Dec 2022 00:46:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10562"; a="713214523" X-IronPort-AV: E=Sophos;i="5.96,249,1665471600"; d="scan'208,217";a="713214523" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga008.fm.intel.com with ESMTP; 16 Dec 2022 00:46:36 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 16 Dec 2022 00:46:35 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Fri, 16 Dec 2022 00:46:35 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.43) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Fri, 16 Dec 2022 00:46:35 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ks9aV9vLWjkHH/OfmlFTru3ttQsydXaOxP7BHpON5iClYeX809tUNgjQ5afLJdaSjhM+wSzZ6Sva3f81crhJLeOC4uLv2pOltQmT5FiiZN0V5a2ugKgNJHJEYwFd5eLwmBl/UBF3eBBoQV+jxnxsAGIaoH4VUM8wqnCVgwf2wNo1mHPYt5Z1zkZhfJopZRtSJ+WDWloX3qn44KFmsRJVNxLgktCQt8pY5tFoKXZPlGUG3Q8cnKZlJnoIUf+CmqNv8wcPeZUG7WYb9cUVYoywLchIBaI6EnSFg86Ba3SgD25YPT9r7UE903zS7LoLNN99c3GHedEKz0HP9vQyqbVvLQ== 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=IiFgLhtpmizEIcANQXmFIvKXgshBmJib06G7DgTTWzY=; b=kJyHGCRnG0xf6hiN0LjZm0Mp41YkobOVBXFFRmcAP/ESwDzt6FgimV1eyHid9chydlg+UOruVSYNzAid0LAbwUk2UZJLm9YKJWvZ8zoYM4e3y3ISRPbvaKMziviA2FFxz+AYXxHPmBCNpnuLPCO2SGubUVcs33zCSTNNGlvJnbFk5wxD4UfwwodfH3Ymv6ba0jHziCgGdHL8y4QigZwetpzqI+hJguHRjJIZ3/XdgzSkJl4Jd0BnU2RhzOsTVFI0pAEPmVjSNdpLoRxtUYkjN8dNYgZtVfKQy4kKi3Rkgwun+kv+mOn2On5HpV9eI+ad/9xMMSgBFsJEitOcu6XFTQ== 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 BY5PR11MB4401.namprd11.prod.outlook.com (2603:10b6:a03:1be::13) by PH7PR11MB7097.namprd11.prod.outlook.com (2603:10b6:510:20c::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19; Fri, 16 Dec 2022 08:46:34 +0000 Received: from BY5PR11MB4401.namprd11.prod.outlook.com ([fe80::5f0c:8736:f13b:1450]) by BY5PR11MB4401.namprd11.prod.outlook.com ([fe80::5f0c:8736:f13b:1450%5]) with mapi id 15.20.5880.019; Fri, 16 Dec 2022 08:46:34 +0000 From: "Boeuf, Sebastien" To: "Yao, Jiewen" , "devel@edk2.groups.io" CC: "Xu, Min M" , "kraxel@redhat.com" Subject: Re: [PATCH v2 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor Thread-Topic: [PATCH v2 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor Thread-Index: AQHZEJdzCcFzkpAAqUuSy9x3Opz5Oa5v1KAAgABf8Pc= Date: Fri, 16 Dec 2022 08:46:34 +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: BY5PR11MB4401:EE_|PH7PR11MB7097:EE_ x-ms-office365-filtering-correlation-id: ec7ab279-09eb-45ec-094d-08dadf420956 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: /czAbjz9c8/MmKdjo0ZFaLzoEFgJZIUEjbbN1zVeXycDD5vjFZt2c3zdWjLhCrkXxbaMBKZs9dqJJn1GOEyflhX5Ypx2ce6HMpi0su/AQLdGH+srAHSeBwO9Ml1CygD0Xx0gSkJx+z2ECJwzSDcjK9jPpW/iEqOybM6UQTAMhDoUpxYXzCySu8a/9gluRUIEojt+0QDdzcbZtwkPO8GV10KeOiUMVfgvoiqpIqsfL0Lg8S8B8QDK7M0M1BlUHOTVSu9uJxJ16GwSmDHiCSYDn81E2F1WNlVQpcECSAi7Ym7LqWiodOJrsxV/+ggY9OIMIZqW9w0Y9QitOaoMRuA1tRRlp4ljK4ENI7oRTzDTpce15fUD8BGIExgZTNguFt3DpWRZLsQ4ioxi+J1U9fU7z4KQ6PokgwWeJ6xIC7Cg+gBELYgRCZotwOu/Ko1yDxdcmk2IwR7VHOxnwFyFQvXwgKhq/0cLJuXsRRocHuaUKAs7w9b5vZrxgENLhQVMkmEsdnQxuVbT8JIGfqGpdW26am2i6+VW4DAeqPiotvrfbYDt6wic8AkAuh1usRgRPQ25y1m7AqYC9YxPEf2Fap0BmfXhImnrgYZtNPTnmjQJ4tCICcEu0+9M1CkNZylRbvmCuWqkEVsEVKsJihrGUpNg7e/hCbncA515aKTxf4zFWhz6BYT4JBq3EGONGbZa17h9oQ+YbwtlghyMIpF/FrMJGF197sSyQpPN4S9ixvumQdM= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR11MB4401.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(366004)(346002)(376002)(136003)(39860400002)(396003)(451199015)(52536014)(8676002)(5660300002)(8936002)(66476007)(64756008)(33656002)(66446008)(55016003)(41300700001)(66556008)(186003)(76116006)(122000001)(4326008)(66946007)(7696005)(91956017)(38100700002)(9686003)(966005)(86362001)(83380400001)(71200400001)(6506007)(38070700005)(54906003)(316002)(166002)(82960400001)(110136005)(26005)(478600001)(53546011)(2906002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xZJjuojnZti4mTbjlBfuNhIlKpmAMT5d/1e1F/njgFiebdbhlAZKNHHBbEJ1?= =?us-ascii?Q?YrXBk0cFILTSummXyV5Q8HuxzN7apYUVXEAFRlNKcjN8AdL+r6CCduP5VlUq?= =?us-ascii?Q?MTJIxMVy6CaWY64jrU8DtT+C20F7j4GI32ahX2yFb+6pHoX9NSoKnZ9zuvTZ?= =?us-ascii?Q?LV81TTfhakRUZhK6FGy7lEU7vQQ+16mc+XqgacGQdIoyitryTzZ0HeLtDNgD?= =?us-ascii?Q?mSI+SE8lvZUewaOZCPPT0enjhm+MFy+H1W2DYMSi7Q/KwV7XC6Shcz/HD+Db?= =?us-ascii?Q?dSoHmlERjv6G+m8wTaD8aLR3y+0hvpOY0m7fj/pZOqBY2WGCg5oTTG7BWthM?= =?us-ascii?Q?/sMlA6HJfvfylxAyVsqjbpe0pFCrSypmr/MWpZ4gEmJyBd5oWVf3tXwHucNd?= =?us-ascii?Q?ZIn7pwQkgE2JkOSJp0bJep4rSQwhLAu+Hzlvw0AoJsHGrLEh+OxR8fmJRSkU?= =?us-ascii?Q?E5niQsJVUhW71pRE5Ryus4TSdWs8dbq6HIAjSMcIdmjGHHJ2aSpQbZ3aB9I6?= =?us-ascii?Q?v26Ys9XKCmY0tOW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Bqt6KMduN?= =?us-ascii?Q?8tqARaY2NUvztE3JjLnY4UA7N8uguS3zjH1+PDoCsCIMLh6Jycw5jeag0ooG?= =?us-ascii?Q?NtBsEKfPN0j+9MqsHPaEEAg7Imrb6OX3sZn2/m85IfKvqGVXf7a7y4uFJ4qY?= =?us-ascii?Q?TF7Snghe+zqEYeLPswMKq3np7TjgzJLWDBTzz6QsvGoqr8Luumtot7zpkwrB?= =?us-ascii?Q?vZDP2KSjdA4QvU5VNsqibRw=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB4401.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ec7ab279-09eb-45ec-094d-08dadf420956 X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Dec 2022 08:46:34.3190 (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: X5WTFN+DhAamDKT9C4kNy68vPdgeigLyrTCd6ra3JJUSzFpalZMLS/4zfp6ym434wCOYzD4Wiwr6qiKEqShLc/PtpXSRa4luqTgpPWcuXN4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB7097 Return-Path: sebastien.boeuf@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BY5PR11MB44010A123764F2DA42A47414EAE69BY5PR11MB4401namp_" --_000_BY5PR11MB44010A123764F2DA42A47414EAE69BY5PR11MB4401namp_ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Thank you Jiewen :) ________________________________ From: Yao, Jiewen Sent: Friday, December 16, 2022 4:03:00 AM To: Boeuf, Sebastien ; devel@edk2.groups.io Cc: Xu, Min M ; kraxel@redhat.com Subject: RE: [PATCH v2 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervis= or Merged: https://github.com/tianocore/edk2/pull/3778 > -----Original Message----- > From: Boeuf, Sebastien > Sent: Thursday, December 15, 2022 11:10 PM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Xu, Min M ; > kraxel@redhat.com; Boeuf, Sebastien > Subject: [PATCH v2 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor > > From: Sebastien Boeuf > > 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. > > 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. > > 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. > > 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 > > ArmVirtPkg/ArmVirtQemu.dsc | 1 + > OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c | 8 +- > OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h | 6 ++ > OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 3 + > OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 87 +++++++++++++++++++++ > OvmfPkg/Library/PlatformInitLib/IntelTdx.c | 5 ++ > OvmfPkg/Library/PlatformInitLib/MemDetect.c | 5 +- > OvmfPkg/OvmfPkg.dec | 1 + > 8 files changed, 114 insertions(+), 2 deletions(-) > > -- > 2.34.1 --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, = 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 5 208 026.16 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. --_000_BY5PR11MB44010A123764F2DA42A47414EAE69BY5PR11MB4401namp_ Content-Type: text/html; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable
Thank you Jiewen :)

From: Yao, Jiewen <jiewe= n.yao@intel.com>
Sent: Friday, December 16, 2022 4:03:00 AM
To: Boeuf, Sebastien <sebastien.boeuf@intel.com>; devel@edk2.g= roups.io <devel@edk2.groups.io>
Cc: Xu, Min M <min.m.xu@intel.com>; kraxel@redhat.com <krax= el@redhat.com>
Subject: RE: [PATCH v2 0/3] OvmfPkg: Make IntelTdx work with Cloud H= ypervisor
 
Merged: https://github.com/tianocore/edk2/pull/3778

> -----Original Message-----
> From: Boeuf, Sebastien <sebastien.boeuf@intel.com>
> Sent: Thursday, December 15, 2022 11:10 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Xu, Min M <min.m.xu@i= ntel.com>;
> kraxel@redhat.com; Boeuf, Sebastien <sebastien.boeuf@intel.com><= br> > Subject: [PATCH v2 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervi= sor
>
> From: Sebastien Boeuf <sebastien.boeuf@intel.com>
>
> The IntelTdxX64 OVMF target wasn't working with Cloud Hypervisor on TD= X
> platform. This was due to the way the OVMF code expects Cloud Hypervis= or
> to rely on PVH to retrieve information like memory below 4GiB as well = as
> the ACPI tables.
>
> 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 fall= s
> back onto the CMOS to retrieve the correct information, and for the AC= PI
> tables, it relies on the HOB to obtain every table individually before=
> to expose them to the guest OS.
>
> 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.
>
> 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
>
>  ArmVirtPkg/ArmVirtQemu.dsc      &n= bsp;           |  1 = +
>  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c    &n= bsp; |  8 +-
>  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h    &n= bsp; |  6 ++
>  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf |  3 +
>  OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c    &nb= sp;  | 87 +++++++++++++++++++++
>  OvmfPkg/Library/PlatformInitLib/IntelTdx.c  |  5 ++
>  OvmfPkg/Library/PlatformInitLib/MemDetect.c |  5 +-
>  OvmfPkg/OvmfPkg.dec       &nb= sp;            =      |  1 +
>  8 files changed, 114 insertions(+), 2 deletions(-)
>
> --
> 2.34.1

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris,
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 5 208 026.16 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

--_000_BY5PR11MB44010A123764F2DA42A47414EAE69BY5PR11MB4401namp_--