From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.16251.1654390982054574984 for ; Sat, 04 Jun 2022 18:03:02 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Ky7tFQZa; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1654390982; x=1685926982; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=r8bIS66dVVSj9VWmmHhSMcsljpzlPN6+joVCcmgdG4E=; b=Ky7tFQZaD+BsyekYIL/jsvYRIS96yuLAGM+4V7MnIkYkuapR6gUBhUf+ ZXX++DZAomgiPciXgtZzmG1Qpvq7gWkRTAVURqaLsAxmmUVXddSlQA0UF CkZPwD8fudtwG8KjKtPsjt803DPzqc3DTfD9j78xTNAzkYM4FLgVhQeuz gagPEnbQJaW6rpX8vYCTv5PGtHRWrT0OgywKn7tn/WasTpovbPmJTPWRi DDyffnWyKFVEwQ8oCNq+u3dcV7nB7n8LNsb3W4h5zaNl734+GvJGrn8Rr y2i2qXPoRcvnZ0PxIatBiowLh/DdimLE46OKciTPAlkwVbaTWTsPG+yaZ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10368"; a="276257299" X-IronPort-AV: E=Sophos;i="5.91,278,1647327600"; d="scan'208";a="276257299" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2022 18:03:01 -0700 X-IronPort-AV: E=Sophos;i="5.91,278,1647327600"; d="scan'208";a="608039297" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.171.120]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2022 18:02:59 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Jiewen Yao , Jian J Wang , Erdem Aktas , James Bottomley , Tom Lendacky , Gerd Hoffmann Subject: [PATCH 0/3] Introduce SecTpmMeasurementLibTdx Date: Sun, 5 Jun 2022 09:02:45 +0800 Message-Id: X-Mailer: git-send-email 2.29.2.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit SecTpmMeasurementLibTdx is an instance of TpmMeasurement lib in SEC phase. It provides RTMR based measurement functions for Intel Tdx guest. Commit a708536dce introduces SecMeasurementLibTdx which provides the same functions. But it is not an instance of TpmMeasurementLib. We have updated DxeTpmMeasurementLib (which is an instance of TpmMeasurementLib) to support RTMR based measurement. To make the design consistent, SecTpmMeasurementLibTdx is introduced. After that SecMeasurementLibTdx is removed. Patch #1: Introduce SecMeasurementLibTdx Patch #2: Update OvmfPkg to support MeasureHobList/MeasureFvImage with SecMeasurementLibTdx. Patch #3: Remove SecMeasurementLibTdx. Code: https://github.com/mxu9/edk2/tree/secMeasurementLib.v1 Cc: Jiewen Yao Cc: Jian J Wang Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Gerd Hoffmann Signed-off-by: Min Xu Min M Xu (3): Security: Add SecTpmMeasurementLibTdx OvmfPkg: Implement MeasureHobList/MeasureFvImage OvmfPkg: Delete SecMeasurementLibTdx OvmfPkg/Include/Library/SecMeasurementLib.h | 46 --- OvmfPkg/IntelTdx/IntelTdxX64.dsc | 2 +- OvmfPkg/Library/PeilessStartupLib/IntelTdx.c | 186 ++++++++++ .../PeilessStartupLib/PeilessStartup.c | 1 - .../PeilessStartupInternal.h | 36 ++ .../PeilessStartupLib/PeilessStartupLib.inf | 2 +- .../SecMeasurementLib/SecMeasurementLibTdx.c | 340 ------------------ .../SecMeasurementLibTdx.inf | 30 -- OvmfPkg/OvmfPkg.dec | 4 - .../SecTpmMeasurementLibTdx.c | 176 +++++++++ .../SecTpmMeasurementLibTdx.inf | 34 ++ SecurityPkg/SecurityPkg.dsc | 2 + 12 files changed, 436 insertions(+), 423 deletions(-) delete mode 100644 OvmfPkg/Include/Library/SecMeasurementLib.h delete mode 100644 OvmfPkg/Library/SecMeasurementLib/SecMeasurementLibTdx.c delete mode 100644 OvmfPkg/Library/SecMeasurementLib/SecMeasurementLibTdx.inf create mode 100644 SecurityPkg/Library/SecTpmMeasurementLib/SecTpmMeasurementLibTdx.c create mode 100644 SecurityPkg/Library/SecTpmMeasurementLib/SecTpmMeasurementLibTdx.inf -- 2.29.2.windows.2