[PATCH v4 0/3] Enable Cloud Hypervisor support in edk2


Jianyong Wu
 

Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that
runs on top of KVM. Cloud Hypervisor is implemented in Rust and is based
on the rust-vmm crates. See [1] to find more.

To support UEFI, Cloud Hypervisor is introduced here.
There are 2 parts to be considered to do this enablement, that is:
1. specific ACPI service implementation compared with qemu, there is no
device like Fw-cfg, so we have no elegant way to get the RSDP address.
A specific ACPI implementation is introduced here.

2. build configuration file for Cloud Hypervisor

Change log:

v3 to v4:
(1) remove Tpm support in dsc file
(2) refine Acpi table install code base on Sami's comments in v3

v2 to v3:
(1) reuse qemu's memory initialization lib as they are in nearly the same
memory laout.
(2) split Acpi implemetation into PlatformHasAcpi and
InstallAcpiTable.
(3) remove lots of dependencies from qemu like "*Fwcfg*" lib.
(4) lots of code cleanup work to let it more approach to edk2 code
style.

[1] https://github.com/cloud-hypervisor/cloud-hypervisor

Jianyong Wu (3):
Acpi: reimplement PlatformHasAcpi for Cloud Hypervisor
Acpi: Install Acpi tables for Cloud hypervisor
ArmVirtCloudHv: support Cloud Hypervisor in edk2

ArmVirtPkg/ArmVirtPkg.dec | 6 +
ArmVirtPkg/ArmVirtCloudHv.dsc | 364 ++++++++++++++++++
ArmVirtPkg/ArmVirtCloudHv.fdf | 258 +++++++++++++
.../CloudHvAcpiPlatformDxe.inf | 47 +++
.../CloudHvHasAcpiDtDxe.inf | 43 +++
.../CloudHvAcpiPlatformDxe/CloudHvAcpi.c | 155 ++++++++
.../CloudHvHasAcpiDtDxe.c | 69 ++++
7 files changed, 942 insertions(+)
create mode 100644 ArmVirtPkg/ArmVirtCloudHv.dsc
create mode 100644 ArmVirtPkg/ArmVirtCloudHv.fdf
create mode 100644 ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf
create mode 100644 ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf
create mode 100644 ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpi.c
create mode 100644 ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.c

--
2.17.1


Ard Biesheuvel
 

On Mon, 5 Jul 2021 at 12:06, Jianyong Wu <jianyong.wu@arm.com> wrote:

Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that
runs on top of KVM. Cloud Hypervisor is implemented in Rust and is based
on the rust-vmm crates. See [1] to find more.

To support UEFI, Cloud Hypervisor is introduced here.
There are 2 parts to be considered to do this enablement, that is:
1. specific ACPI service implementation compared with qemu, there is no
device like Fw-cfg, so we have no elegant way to get the RSDP address.
A specific ACPI implementation is introduced here.

2. build configuration file for Cloud Hypervisor

Change log:

v3 to v4:
(1) remove Tpm support in dsc file
(2) refine Acpi table install code base on Sami's comments in v3

v2 to v3:
(1) reuse qemu's memory initialization lib as they are in nearly the same
memory laout.
(2) split Acpi implemetation into PlatformHasAcpi and
InstallAcpiTable.
(3) remove lots of dependencies from qemu like "*Fwcfg*" lib.
(4) lots of code cleanup work to let it more approach to edk2 code
style.

[1] https://github.com/cloud-hypervisor/cloud-hypervisor

Jianyong Wu (3):
Acpi: reimplement PlatformHasAcpi for Cloud Hypervisor
Acpi: Install Acpi tables for Cloud hypervisor
ArmVirtCloudHv: support Cloud Hypervisor in edk2
Sami, any thoughts on this code?


ArmVirtPkg/ArmVirtPkg.dec | 6 +
ArmVirtPkg/ArmVirtCloudHv.dsc | 364 ++++++++++++++++++
ArmVirtPkg/ArmVirtCloudHv.fdf | 258 +++++++++++++
.../CloudHvAcpiPlatformDxe.inf | 47 +++
.../CloudHvHasAcpiDtDxe.inf | 43 +++
.../CloudHvAcpiPlatformDxe/CloudHvAcpi.c | 155 ++++++++
.../CloudHvHasAcpiDtDxe.c | 69 ++++
7 files changed, 942 insertions(+)
create mode 100644 ArmVirtPkg/ArmVirtCloudHv.dsc
create mode 100644 ArmVirtPkg/ArmVirtCloudHv.fdf
create mode 100644 ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf
create mode 100644 ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf
create mode 100644 ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpi.c
create mode 100644 ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.c

--
2.17.1


Ard Biesheuvel
 

On Fri, 16 Jul 2021 at 19:25, Ard Biesheuvel <ardb@kernel.org> wrote:

On Mon, 5 Jul 2021 at 12:06, Jianyong Wu <jianyong.wu@arm.com> wrote:

Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that
runs on top of KVM. Cloud Hypervisor is implemented in Rust and is based
on the rust-vmm crates. See [1] to find more.

To support UEFI, Cloud Hypervisor is introduced here.
There are 2 parts to be considered to do this enablement, that is:
1. specific ACPI service implementation compared with qemu, there is no
device like Fw-cfg, so we have no elegant way to get the RSDP address.
A specific ACPI implementation is introduced here.

2. build configuration file for Cloud Hypervisor

Change log:

v3 to v4:
(1) remove Tpm support in dsc file
(2) refine Acpi table install code base on Sami's comments in v3

v2 to v3:
(1) reuse qemu's memory initialization lib as they are in nearly the same
memory laout.
(2) split Acpi implemetation into PlatformHasAcpi and
InstallAcpiTable.
(3) remove lots of dependencies from qemu like "*Fwcfg*" lib.
(4) lots of code cleanup work to let it more approach to edk2 code
style.

[1] https://github.com/cloud-hypervisor/cloud-hypervisor

Jianyong Wu (3):
Acpi: reimplement PlatformHasAcpi for Cloud Hypervisor
Acpi: Install Acpi tables for Cloud hypervisor
ArmVirtCloudHv: support Cloud Hypervisor in edk2
Sami, any thoughts on this code?

... or did you already merge the entire series? (My mailbox is
overflowing a bit after 4 weeks of vacation :-))



ArmVirtPkg/ArmVirtPkg.dec | 6 +
ArmVirtPkg/ArmVirtCloudHv.dsc | 364 ++++++++++++++++++
ArmVirtPkg/ArmVirtCloudHv.fdf | 258 +++++++++++++
.../CloudHvAcpiPlatformDxe.inf | 47 +++
.../CloudHvHasAcpiDtDxe.inf | 43 +++
.../CloudHvAcpiPlatformDxe/CloudHvAcpi.c | 155 ++++++++
.../CloudHvHasAcpiDtDxe.c | 69 ++++
7 files changed, 942 insertions(+)
create mode 100644 ArmVirtPkg/ArmVirtCloudHv.dsc
create mode 100644 ArmVirtPkg/ArmVirtCloudHv.fdf
create mode 100644 ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf
create mode 100644 ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf
create mode 100644 ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpi.c
create mode 100644 ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.c

--
2.17.1


Sami Mujawar
 

Hi Ard,

´╗┐On 16/07/2021, 18:28, "Ard Biesheuvel" <ardb@kernel.org> wrote:

On Fri, 16 Jul 2021 at 19:25, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Mon, 5 Jul 2021 at 12:06, Jianyong Wu <jianyong.wu@arm.com> wrote:
> >
> > Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that
> > runs on top of KVM. Cloud Hypervisor is implemented in Rust and is based
> > on the rust-vmm crates. See [1] to find more.
> >
> > To support UEFI, Cloud Hypervisor is introduced here.
> > There are 2 parts to be considered to do this enablement, that is:
> > 1. specific ACPI service implementation compared with qemu, there is no
> > device like Fw-cfg, so we have no elegant way to get the RSDP address.
> > A specific ACPI implementation is introduced here.
> >
> > 2. build configuration file for Cloud Hypervisor
> >
> > Change log:
> >
> > v3 to v4:
> > (1) remove Tpm support in dsc file
> > (2) refine Acpi table install code base on Sami's comments in v3
> >
> > v2 to v3:
> > (1) reuse qemu's memory initialization lib as they are in nearly the same
> > memory laout.
> > (2) split Acpi implemetation into PlatformHasAcpi and
> > InstallAcpiTable.
> > (3) remove lots of dependencies from qemu like "*Fwcfg*" lib.
> > (4) lots of code cleanup work to let it more approach to edk2 code
> > style.
> >
> > [1] https://github.com/cloud-hypervisor/cloud-hypervisor
> >
> > Jianyong Wu (3):
> > Acpi: reimplement PlatformHasAcpi for Cloud Hypervisor
> > Acpi: Install Acpi tables for Cloud hypervisor
> > ArmVirtCloudHv: support Cloud Hypervisor in edk2
> >
>
> Sami, any thoughts on this code?
>


... or did you already merge the entire series? (My mailbox is
overflowing a bit after 4 weeks of vacation :-))
[SAMI] I have merged this series.

Regards,

Sami Mujawar


>
> > ArmVirtPkg/ArmVirtPkg.dec | 6 +
> > ArmVirtPkg/ArmVirtCloudHv.dsc | 364 ++++++++++++++++++
> > ArmVirtPkg/ArmVirtCloudHv.fdf | 258 +++++++++++++
> > .../CloudHvAcpiPlatformDxe.inf | 47 +++
> > .../CloudHvHasAcpiDtDxe.inf | 43 +++
> > .../CloudHvAcpiPlatformDxe/CloudHvAcpi.c | 155 ++++++++
> > .../CloudHvHasAcpiDtDxe.c | 69 ++++
> > 7 files changed, 942 insertions(+)
> > create mode 100644 ArmVirtPkg/ArmVirtCloudHv.dsc
> > create mode 100644 ArmVirtPkg/ArmVirtCloudHv.fdf
> > create mode 100644 ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpiPlatformDxe.inf
> > create mode 100644 ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.inf
> > create mode 100644 ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpi.c
> > create mode 100644 ArmVirtPkg/CloudHvPlatformHasAcpiDtDxe/CloudHvHasAcpiDtDxe.c
> >
> > --
> > 2.17.1
> >

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.