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.135614.1671117052986226917 for ; Thu, 15 Dec 2022 07:10:53 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=X1Z/uZbe; 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=1671117052; x=1702653052; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Ymfoy48tRhF1k5/0VDB3RipA7ci+HShg7KxepukJmEw=; b=X1Z/uZbeAUvyTQdcHz0bBuwanyQjxlyQmR/b0H70txoRy3uHHbcuqCKo hf5nPPUWuX6ZyF5PV9PKQARCXUhsVODSRtR9TuVRHsgW+L2MFkBDGbvFP +zuEXKfP3jlNrjxrhgH33Ds027ZaWy1q7VUtIawVj456DRJgg8L2gF8xr l5R80CiWiyzCZPUNcquoMUGpMSls3NtbsQfzdZDVnI4phiWsEpAizXd2C HIcaQZG/demG/ebMCLAP67XiETpsThDtTVwmfYSxcusu+eqZbAh1rs3EC v++0HtG+cM+jZ7ApnjP2ninMci1z4qiqbZVzPxecX7IlSnDYmE7UnztxA A==; X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="299048751" X-IronPort-AV: E=Sophos;i="5.96,247,1665471600"; d="scan'208";a="299048751" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2022 07:10:52 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10561"; a="773759665" X-IronPort-AV: E=Sophos;i="5.96,247,1665471600"; d="scan'208";a="773759665" Received: from bholthau-mobl1.ger.corp.intel.com (HELO sboeuf-mobl.home) ([10.252.60.50]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Dec 2022 07:10:09 -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 v2 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor Date: Thu, 15 Dec 2022 16:10:01 +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 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.