audk/OvmfPkg/CloudHv
Mike Beaton e3362a759d OvmfPkg: Fix unable to build OVMF with -D NETWORK_ENABLE=0
https://bugzilla.tianocore.org/show_bug.cgi?id=4829

7f17a15 (2024/02/22)
"OvmfPkg: Shell*.inc: allow building without network support"
breaks building OVMF with `-D NETWORK_ENABLE=0`.

Before this commit we could build OVMF e.g. with the following
command in the OvmfPkg directory:

./build.sh -D NETWORK_ENABLE=0

After the commit the same command fails early with:

/home/user/OpenSource/edk2/OvmfPkg/OvmfPkgX64.dsc(15):
error F001: Pcd (gEfiNetworkPkgTokenSpaceGuid.PcdAllowHttpConnections)
defined in DSC is not declared in DEC files referenced in INF files in
FDF. Arch: ['X64']

The problem applies in Intel OvmfPkg platforms.
Additionally, it applies in various other OvmfPkg
platforms, but is masked buy another issue; namely
that these platforms incorrectly still include some
network packages when most are disabled.
(A fix for that issue has previously been
made, in OvmfPkg Intel platforms only, by
d933ec1 followed by
7f17a15 .)

This commit conditionally removes the undefined Pcd references
in all OvmfPkg platforms which are now affected by this
issue, and in all those which would be affected as and
when the other issue mentioned above is fixed.

Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
2024-09-09 11:32:26 +01:00
..
CloudHvDefines.fdf.inc OvmfPkg: CloudHv: Fix FW_BASE_ADDRESS 2022-06-03 10:51:26 +00:00
CloudHvElfHeader.fdf.inc OvmfPkg: Generate CloudHv as a PVH ELF binary 2022-03-04 02:41:57 +00:00
CloudHvX64.dsc OvmfPkg: Fix unable to build OVMF with -D NETWORK_ENABLE=0 2024-09-09 11:32:26 +01:00
CloudHvX64.fdf Remove hacks related to former lack of XCODE5 .hii support 2024-07-22 13:47:18 +03:00
README Build: Replaced GCC5 toolchain with GCC. 2024-07-22 13:49:00 +03:00

README

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


CloudHv is a port of OVMF for the Cloud Hypervisor project.

The Cloud Hypervisor project
----------------------------

Cloud Hypervisor is a Virtual Machine Monitor that runs on top of KVM. The
project focuses on exclusively running modern, cloud workloads, on top of a
limited set of hardware architectures and platforms. Cloud workloads refers to
those that are usually run by customers inside a cloud provider. This means
modern operating systems with most I/O handled by paravirtualised devices
(i.e. virtio), no requirement for legacy devices, and 64-bit CPUs.

https://github.com/cloud-hypervisor/cloud-hypervisor

Design
------

Based on Cloud Hypervisor's motto to reduce the emulation as much as possible,
the project logically decided to support the PVH boot specification as the only
way of booting virtual machines. That includes both direct kernel boot and OVMF
firmware which must be generated as PVH ELF binaries.
PVH allows information like location of ACPI tables and location of guest RAM
ranges to be shared without the need of an extra emulated device like a CMOS.

Features
--------

* Serial console
* EFI shell
* virtio-pci

Build
-----

The way to build the CloudHv target is as follows:

OvmfPkg/build.sh -p OvmfPkg/CloudHv/CloudHvX64.dsc -a X64 -b DEBUG

Usage
-----

Assuming Cloud Hypervisor is already built, one can start a virtual machine as
follows:

./cloud-hypervisor \
    --cpus boot=1 \
    --memory size=1G \
    --kernel Build/CloudHvX64/DEBUG_GCC/FV/CLOUDHV.fd \
    --disk path=/path/to/disk.raw

Releases
--------

In edk2-stable202202, CloudHv is generated as data-only binary.
Starting with edk2-stable202205, CloudHv is generated as a PVH ELF binary to
reduce the amount of emulation needed from Cloud Hypervisor.
For TDX, things are handled differently and PVH is not used, which is why the
firmware is always generated as a data-only binary.

+-------------------+----------------+
|                   |    CloudHv     |
+-------------------+----------------+
| edk2-stable202202 | Data binary    |
+-------------------+----------------+
| edk2-stable202205 | PVH ELF binary |
+-------------------+----------------+