From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.38614.1670835833895568543 for ; Mon, 12 Dec 2022 01:03:54 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=G7oSyT1K; spf=pass (domain: intel.com, ip: 134.134.136.126, 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=1670835833; x=1702371833; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=L29FUX+jm/EJtPLHNnrW2iVtZBwV07oNBOnyCixhP3I=; b=G7oSyT1KDjQjvRFJmjZ2zmC6NDuxZYZbkGEBqt9C6AS8zDBRIpLK7fuA 4U/okrKEEsRXfGZU7d7WHY94lVdpc9DLg8RnCQKZsSfed0O3kykOZggir 6cZm5jbRoBdZb1umgeFmxGiSD4J71LtmM6f1I5Lvw+djYHYbrw6d4Pcgr RCcg/RDc5B3OAKBgoqnWT/KdaId/ZdCIS5beFstNNBNL+RZBipFTAV3YL bygw+CdQZTN6Aj3fiIWGYjND2wQ1oQJXrAVyEoESFcp9qwXNoZWY8ESme kd0FFjs3lX1C6dwHQkIaTAESNEoF/qHPR1Qp0uoYZS5X9QUDTEFOQQ50L w==; X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="301225926" X-IronPort-AV: E=Sophos;i="5.96,237,1665471600"; d="scan'208";a="301225926" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 01:03:52 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="822414684" X-IronPort-AV: E=Sophos;i="5.96,237,1665471600"; d="scan'208";a="822414684" Received: from vdesserx-mobl1.ger.corp.intel.com (HELO sboeuf-mobl.home) ([10.252.58.223]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Dec 2022 01:03:50 -0800 From: "Boeuf, Sebastien" To: devel@edk2.groups.io Cc: jiewen.yao@intel.com, min.m.xu@intel.com, kraxel@redhat.com, sebastien.boeuf@intel.com Subject: [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor Date: Mon, 12 Dec 2022 10:03:40 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 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(-) -- 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.