public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Min Xu" <min.m.xu@intel.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	James Bottomley <jejb@linux.ibm.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Michael Roth <michael.roth@amd.com>
Subject: Re: [PATCH V3 5/9] OvmfPkg/TdxHelperLib: Implement TdxHelperBuildGuidHobForTdxMeasurement
Date: Thu, 26 Jan 2023 07:09:55 +0000	[thread overview]
Message-ID: <PH0PR11MB5064F01214687CED339831C8C5CF9@PH0PR11MB5064.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230125122223.xsc2kwwpcajn53bi@sirius.home.kraxel.org>

On January 25, 2023 8:22 PM, Gerd Hoffmann wrote:
> > +#define FV_HANDOFF_TABLE_DESC  "Fv(XXXXXXXX-XXXX-XXXX-XXXX-
> XXXXXXXXXXXX)"
> > +typedef PLATFORM_FIRMWARE_BLOB2_STRUCT
> CFV_HANDOFF_TABLE_POINTERS2;
> 
> > -#define FV_HANDOFF_TABLE_DESC  "Fv(XXXXXXXX-XXXX-XXXX-XXXX-
> XXXXXXXXXXXX)"
> > -typedef struct {
> > -  UINT8                   BlobDescriptionSize;
> > -  UINT8                   BlobDescription[sizeof (FV_HANDOFF_TABLE_DESC)];
> > -  EFI_PHYSICAL_ADDRESS    BlobBase;
> > -  UINT64                  BlobLength;
> > -} FV_HANDOFF_TABLE_POINTERS2;
> 
> That update makes sense, but can you please split this (and possibly
> other) code changes to a separate patch so this patch does nothing but
> moving code and the absolute necessary changes needed to make it work
> (update library references, function renames).
> 
Some of the data struct and functions in TdxMeasurementHob.c are moved from PeilessStartupLib/IntelTdx.c
 - TDX_HANDOFF_TABLE_POINTERS2
 - CFV_HANDOFF_TABLE_POINTERS2
 - GetFvName

BuildTdxMeasurementGuidHob is partially copied from TpmMeasureAndLogData@SecTpmMeasurementLibTdx.c.
InternalBuildGuidHobForTdxMeasurement is newly added.

That is because in the previous PeilessStartupLib/IntelTdx.c the measurement uses the TpmMeasureAndLogData which is exported by SecTpmMeasurementLibTdx.c. It does not only measurement/extending, but also builds GuidHob of the measurement.

Now in this patch-set, the measurement/extending and the building of GuidHob are split.
Firstly HobList and CFV image are measured and extended (at the same time the measurement values are stored in WorkArea because at that time the Hob service is not ready).
Then after hob service is ready, GuidHob of the measurements are built.

So it's hard to separate the patch into the one that does nothing but moving code. I would put below change in a sperate patch.
 +#define FV_HANDOFF_TABLE_DESC  "Fv(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)"
 +typedef PLATFORM_FIRMWARE_BLOB2_STRUCT  CFV_HANDOFF_TABLE_POINTERS2;
Then keep the other changes in another patch.

What's your thought?

Thanks
Min

  parent reply	other threads:[~2023-01-26  7:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-25  2:23 [PATCH V3 0/9] Enable Tdx measurement in OvmfPkgX64 Min Xu
2023-01-25  2:23 ` [PATCH V3 1/9] OvmfPkg: Add Tdx measurement data structure in WorkArea Min Xu
2023-01-25  2:23 ` [PATCH V3 2/9] OvmfPkg/IntelTdx: Add TdxHelperLibNull Min Xu
2023-01-25  2:23 ` [PATCH V3 3/9] OvmfPkg/IntelTdx: Add SecTdxHelperLib Min Xu
2023-01-25 12:16   ` Gerd Hoffmann
2023-01-26  1:56     ` [edk2-devel] " Min Xu
2023-01-26  2:01       ` Yao, Jiewen
2023-01-26  2:08         ` Min Xu
2023-01-25  2:23 ` [PATCH V3 4/9] OvmfPkg/IntelTdx: Update tdx measurement in SEC phase Min Xu
2023-01-25  2:23 ` [PATCH V3 5/9] OvmfPkg/TdxHelperLib: Implement TdxHelperBuildGuidHobForTdxMeasurement Min Xu
2023-01-25 12:22   ` Gerd Hoffmann
2023-01-26  1:58     ` Min Xu
2023-01-26  7:09     ` Min Xu [this message]
2023-01-26  7:50       ` Gerd Hoffmann
2023-01-25  2:23 ` [PATCH V3 6/9] OvmfPkg: Enable Tdx measurement in OvmfPkgX64 Min Xu
2023-01-25  2:23 ` [PATCH V3 7/9] OvmfPkg/IntelTdx: Add PeiTdxHelperLib Min Xu
2023-01-25  2:23 ` [PATCH V3 8/9] OvmfPkg/PlatformPei: Build GuidHob for Tdx measurement Min Xu
2023-01-25  2:23 ` [PATCH V3 9/9] OvmfPkg/TdxHelperLib: Implement TdxHelperProcessTdHob Min Xu
2023-01-25 12:24   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR11MB5064F01214687CED339831C8C5CF9@PH0PR11MB5064.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox