[edk2-devel] [PATCH v6 00/29] Add AMD Secure Nested Paging (SEV-SNP) support

Min Xu min.m.xu at intel.com
Thu Sep 9 11:45:47 UTC 2021


On September 9, 2021 7:40 PM, Brijesh Singh wrote:
> On 9/9/21 6:22 AM, Gerd Hoffmann wrote:
> >   Hi,
> >
> >> I am not sure if its a good idea to pack a header like above in a
> >> 32-bit PCD. The caller need to unpack the 32-bit number and perform a
> >> bitshit etc. Additionally we also need to check for reserved bits
> >> being set to zero etc. I am more inclined toward something like this:
> >>
> >> enum {
> > Well, various places probably just need to know whenever they should
> > call into the sev or the tdx library, so grouping stuff makes sense to
> > me.  We don't need bitfields for that though, could also be done this
> > way:
> >
> > enum {
> >    NOT_ENCRYPTED = 0,
> >    AMD_SEV = 0x100,
> >    AMD_SEV_ES,
> >    [ ... ]
> >    INTEL_TDX = 0x200,
> >    [ ... ]
> > }
> >
> > So if you need the exact mode you can compare values as-is, if you
> > want figure which vendor library should be called you'll just mask out
> > the least significant 8 bits.
> 
> Yes, this also works fine.
Agree. So let's follow this way.

Thanks!
Min


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#80432): https://edk2.groups.io/g/devel/message/80432
Mute This Topic: https://groups.io/mt/85306653/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-






More information about the edk2-devel-archive mailing list