[edk2-devel] [PATCH V3 2/3] OvmfPkg: Add PCDs for TdxLib

Min Xu posted 3 patches 4 years, 11 months ago
[edk2-devel] [PATCH V3 2/3] OvmfPkg: Add PCDs for TdxLib
Posted by Min Xu 4 years, 11 months ago
TdxLib for OvmfPkg depends on the below PCDs
  - PcdUseTdxAcceptPage
    Indicate whether TdCall(AcceptPage) is used.
  - PcdUseTdxEmulation
    Indicate whether TdxEmulation is used.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>

Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Doug Reiland <doug.reiland@intel.com>
---
 OvmfPkg/OvmfPkg.dec | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
index 4348bb45c64a..68b3fd86d516 100644
--- a/OvmfPkg/OvmfPkg.dec
+++ b/OvmfPkg/OvmfPkg.dec
@@ -317,6 +317,12 @@
   gUefiOvmfPkgTokenSpaceGuid.PcdSevLaunchSecretBase|0x0|UINT32|0x42
   gUefiOvmfPkgTokenSpaceGuid.PcdSevLaunchSecretSize|0x0|UINT32|0x43
 
+  ## Indicate whether TdCall(AcceptPage) is used.
+  gUefiOvmfPkgTokenSpaceGuid.PcdUseTdxAcceptPage|TRUE|BOOLEAN|0x44
+  ## Indicate whether TdxEmulation is used.
+  gUefiOvmfPkgTokenSpaceGuid.PcdUseTdxEmulation|0x1|UINT32|0x45
+
+
 [PcdsDynamic, PcdsDynamicEx]
   gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2
   gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLEAN|0x10
-- 
2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72567): https://edk2.groups.io/g/devel/message/72567
Mute This Topic: https://groups.io/mt/81195557/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH V3 2/3] OvmfPkg: Add PCDs for TdxLib
Posted by Yao, Jiewen 4 years, 11 months ago
Hi
May I understand why we need this : PcdUseTdxAcceptPage ?
I think accepting page is always required.


For PcdUseTdxEmulation, This is only for pre-production.
For real production, I don't think we need this one, right?


> -----Original Message-----
> From: Xu, Min M <min.m.xu@intel.com>
> Sent: Tuesday, March 9, 2021 2:13 PM
> To: devel@edk2.groups.io
> Cc: Xu, Min M <min.m.xu@intel.com>; Justen, Jordan L
> <jordan.l.justen@intel.com>; Laszlo Ersek <lersek@redhat.com>; Yao, Jiewen
> <jiewen.yao@intel.com>; Reiland, Doug <doug.reiland@intel.com>
> Subject: [PATCH V3 2/3] OvmfPkg: Add PCDs for TdxLib
> 
> TdxLib for OvmfPkg depends on the below PCDs
>   - PcdUseTdxAcceptPage
>     Indicate whether TdCall(AcceptPage) is used.
>   - PcdUseTdxEmulation
>     Indicate whether TdxEmulation is used.
> 
> Cc: Jordan Justen <jordan.l.justen@intel.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> 
> Signed-off-by: Min Xu <min.m.xu@intel.com>
> Signed-off-by: Doug Reiland <doug.reiland@intel.com>
> ---
>  OvmfPkg/OvmfPkg.dec | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
> index 4348bb45c64a..68b3fd86d516 100644
> --- a/OvmfPkg/OvmfPkg.dec
> +++ b/OvmfPkg/OvmfPkg.dec
> @@ -317,6 +317,12 @@
>    gUefiOvmfPkgTokenSpaceGuid.PcdSevLaunchSecretBase|0x0|UINT32|0x42
>    gUefiOvmfPkgTokenSpaceGuid.PcdSevLaunchSecretSize|0x0|UINT32|0x43
> 
> +  ## Indicate whether TdCall(AcceptPage) is used.
> +  gUefiOvmfPkgTokenSpaceGuid.PcdUseTdxAcceptPage|TRUE|BOOLEAN|0x44
> +  ## Indicate whether TdxEmulation is used.
> +  gUefiOvmfPkgTokenSpaceGuid.PcdUseTdxEmulation|0x1|UINT32|0x45
> +
> +
>  [PcdsDynamic, PcdsDynamicEx]
>    gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2
> 
> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLEAN
> |0x10
> --
> 2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72571): https://edk2.groups.io/g/devel/message/72571
Mute This Topic: https://groups.io/mt/81195557/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-


Re: [edk2-devel] [PATCH V3 2/3] OvmfPkg: Add PCDs for TdxLib
Posted by Min Xu 4 years, 11 months ago
Hi, Jiewen
See comments inline.

> -----Original Message-----
> From: Yao, Jiewen <jiewen.yao@intel.com>
> Sent: Tuesday, March 9, 2021 2:44 PM
> To: Xu, Min M <min.m.xu@intel.com>; devel@edk2.groups.io
> Cc: Justen, Jordan L <jordan.l.justen@intel.com>; Laszlo Ersek
> <lersek@redhat.com>; Reiland, Doug <doug.reiland@intel.com>
> Subject: RE: [PATCH V3 2/3] OvmfPkg: Add PCDs for TdxLib
> 
> Hi
> May I understand why we need this : PcdUseTdxAcceptPage ?
> I think accepting page is always required.
This PCD is for test purpose in early development. It doesn't make sense
any more.  It will be removed in next version.


> 
> For PcdUseTdxEmulation, This is only for pre-production.
> For real production, I don't think we need this one, right?
This PCD is for test in SDV environment which emulate the Tdcall by calling
vmcall. It will be removed in next version.

 
> 
> > -----Original Message-----
> > From: Xu, Min M <min.m.xu@intel.com>
> > Sent: Tuesday, March 9, 2021 2:13 PM
> > To: devel@edk2.groups.io
> > Cc: Xu, Min M <min.m.xu@intel.com>; Justen, Jordan L
> > <jordan.l.justen@intel.com>; Laszlo Ersek <lersek@redhat.com>; Yao,
> > Jiewen <jiewen.yao@intel.com>; Reiland, Doug <doug.reiland@intel.com>
> > Subject: [PATCH V3 2/3] OvmfPkg: Add PCDs for TdxLib
> >
> > TdxLib for OvmfPkg depends on the below PCDs
> >   - PcdUseTdxAcceptPage
> >     Indicate whether TdCall(AcceptPage) is used.
> >   - PcdUseTdxEmulation
> >     Indicate whether TdxEmulation is used.
> >
> > Cc: Jordan Justen <jordan.l.justen@intel.com>
> > Cc: Laszlo Ersek <lersek@redhat.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> >
> > Signed-off-by: Min Xu <min.m.xu@intel.com>
> > Signed-off-by: Doug Reiland <doug.reiland@intel.com>
> > ---
> >  OvmfPkg/OvmfPkg.dec | 6 ++++++
> >  1 file changed, 6 insertions(+)
> >
> > diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index
> > 4348bb45c64a..68b3fd86d516 100644
> > --- a/OvmfPkg/OvmfPkg.dec
> > +++ b/OvmfPkg/OvmfPkg.dec
> > @@ -317,6 +317,12 @@
> >
> gUefiOvmfPkgTokenSpaceGuid.PcdSevLaunchSecretBase|0x0|UINT32|0x42
> >
> gUefiOvmfPkgTokenSpaceGuid.PcdSevLaunchSecretSize|0x0|UINT32|0x43
> >
> > +  ## Indicate whether TdCall(AcceptPage) is used.
> > +
> gUefiOvmfPkgTokenSpaceGuid.PcdUseTdxAcceptPage|TRUE|BOOLEAN|0x44
> > +  ## Indicate whether TdxEmulation is used.
> > +  gUefiOvmfPkgTokenSpaceGuid.PcdUseTdxEmulation|0x1|UINT32|0x45
> > +
> > +
> >  [PcdsDynamic, PcdsDynamicEx]
> >    gUefiOvmfPkgTokenSpaceGuid.PcdEmuVariableEvent|0|UINT64|2
> >
> >
> gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable|FALSE|BOOLE
> AN
> > |0x10
> > --
> > 2.29.2.windows.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72578): https://edk2.groups.io/g/devel/message/72578
Mute This Topic: https://groups.io/mt/81195557/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-