[edk2-devel] [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor

Boeuf, Sebastien posted 3 patches 1 year, 4 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c      |  8 +-
OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h      |  6 ++
OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf |  2 +
OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c       | 87 +++++++++++++++++++++
OvmfPkg/Library/PlatformInitLib/IntelTdx.c  |  5 ++
OvmfPkg/Library/PlatformInitLib/MemDetect.c |  4 +-
OvmfPkg/OvmfPkg.dec                         |  1 +
7 files changed, 111 insertions(+), 2 deletions(-)
[edk2-devel] [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor
Posted by Boeuf, Sebastien 1 year, 4 months ago
From: Sebastien Boeuf <sebastien.boeuf@intel.com>

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

 OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c      |  8 +-
 OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h      |  6 ++
 OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf |  2 +
 OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c       | 87 +++++++++++++++++++++
 OvmfPkg/Library/PlatformInitLib/IntelTdx.c  |  5 ++
 OvmfPkg/Library/PlatformInitLib/MemDetect.c |  4 +-
 OvmfPkg/OvmfPkg.dec                         |  1 +
 7 files changed, 111 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.



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97253): https://edk2.groups.io/g/devel/message/97253
Mute This Topic: https://groups.io/mt/95617495/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor
Posted by Yao, Jiewen 1 year, 4 months ago
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>

> -----Original Message-----
> From: Boeuf, Sebastien <sebastien.boeuf@intel.com>
> Sent: Monday, December 12, 2022 5:04 PM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Xu, Min M <min.m.xu@intel.com>;
> kraxel@redhat.com; Boeuf, Sebastien <sebastien.boeuf@intel.com>
> Subject: [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor
> 
> From: Sebastien Boeuf <sebastien.boeuf@intel.com>
> 
> 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
> 
>  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c      |  8 +-
>  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h      |  6 ++
>  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf |  2 +
>  OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c       | 87 +++++++++++++++++++++
>  OvmfPkg/Library/PlatformInitLib/IntelTdx.c  |  5 ++
>  OvmfPkg/Library/PlatformInitLib/MemDetect.c |  4 +-
>  OvmfPkg/OvmfPkg.dec                         |  1 +
>  7 files changed, 111 insertions(+), 2 deletions(-)
> 
> --
> 2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97377): https://edk2.groups.io/g/devel/message/97377
Mute This Topic: https://groups.io/mt/95617495/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor
Posted by Yao, Jiewen 1 year, 4 months ago
Hi Sebastien
CI failed, https://github.com/tianocore/edk2/pull/3769
Have you run CI before submission? Please take a look.


> -----Original Message-----
> From: Yao, Jiewen
> Sent: Thursday, December 15, 2022 12:20 AM
> To: Boeuf, Sebastien <sebastien.boeuf@intel.com>; devel@edk2.groups.io
> Cc: Xu, Min M <min.m.xu@intel.com>; kraxel@redhat.com
> Subject: RE: [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud
> Hypervisor
> 
> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> 
> > -----Original Message-----
> > From: Boeuf, Sebastien <sebastien.boeuf@intel.com>
> > Sent: Monday, December 12, 2022 5:04 PM
> > To: devel@edk2.groups.io
> > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Xu, Min M
> <min.m.xu@intel.com>;
> > kraxel@redhat.com; Boeuf, Sebastien <sebastien.boeuf@intel.com>
> > Subject: [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor
> >
> > From: Sebastien Boeuf <sebastien.boeuf@intel.com>
> >
> > 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
> >
> >  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c      |  8 +-
> >  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h      |  6 ++
> >  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf |  2 +
> >  OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c       | 87
> +++++++++++++++++++++
> >  OvmfPkg/Library/PlatformInitLib/IntelTdx.c  |  5 ++
> >  OvmfPkg/Library/PlatformInitLib/MemDetect.c |  4 +-
> >  OvmfPkg/OvmfPkg.dec                         |  1 +
> >  7 files changed, 111 insertions(+), 2 deletions(-)
> >
> > --
> > 2.34.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#97408): https://edk2.groups.io/g/devel/message/97408
Mute This Topic: https://groups.io/mt/95617495/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor
Posted by Boeuf, Sebastien 1 year, 4 months ago
Hi Jiewen,

Thanks to Min, I've been able to fix the remaining issues.

I've just sent a v2 after I've verified the CI was passing correctly.

Thanks,
Sebastien
________________________________
From: Yao, Jiewen <jiewen.yao@intel.com>
Sent: Thursday, December 15, 2022 3:02 AM
To: Boeuf, Sebastien <sebastien.boeuf@intel.com>; devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Xu, Min M <min.m.xu@intel.com>; kraxel@redhat.com <kraxel@redhat.com>
Subject: RE: [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor

Hi Sebastien
CI failed, https://github.com/tianocore/edk2/pull/3769
Have you run CI before submission? Please take a look.


> -----Original Message-----
> From: Yao, Jiewen
> Sent: Thursday, December 15, 2022 12:20 AM
> To: Boeuf, Sebastien <sebastien.boeuf@intel.com>; devel@edk2.groups.io
> Cc: Xu, Min M <min.m.xu@intel.com>; kraxel@redhat.com
> Subject: RE: [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud
> Hypervisor
>
> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
>
> > -----Original Message-----
> > From: Boeuf, Sebastien <sebastien.boeuf@intel.com>
> > Sent: Monday, December 12, 2022 5:04 PM
> > To: devel@edk2.groups.io
> > Cc: Yao, Jiewen <jiewen.yao@intel.com>; Xu, Min M
> <min.m.xu@intel.com>;
> > kraxel@redhat.com; Boeuf, Sebastien <sebastien.boeuf@intel.com>
> > Subject: [PATCH 0/3] OvmfPkg: Make IntelTdx work with Cloud Hypervisor
> >
> > From: Sebastien Boeuf <sebastien.boeuf@intel.com>
> >
> > 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
> >
> >  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c      |  8 +-
> >  OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h      |  6 ++
> >  OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf |  2 +
> >  OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c       | 87
> +++++++++++++++++++++
> >  OvmfPkg/Library/PlatformInitLib/IntelTdx.c  |  5 ++
> >  OvmfPkg/Library/PlatformInitLib/MemDetect.c |  4 +-
> >  OvmfPkg/OvmfPkg.dec                         |  1 +
> >  7 files changed, 111 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.


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