[PATCH 5/5] OvmfPkg: Install ACPI tables for Cloud Hypervisor


Gerd Hoffmann
 

On Wed, Dec 01, 2021 at 12:04:36PM +0100, sebastien.boeuf@... wrote:
From: Sebastien Boeuf <sebastien.boeuf@...>

Adding support for retrieving the Cloud Hypervisor ACPI tables as a
fallback mechanism if tables are not found through fw_cfg.

Signed-off-by: Rob Bradford <robert.bradford@...>
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@...>
---
OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c | 4 +
OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h | 6 +
OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 1 +
OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 117 ++++++++++++++++++++
OvmfPkg/Include/IndustryStandard/CloudHv.h | 5 +
5 files changed, 133 insertions(+)
create mode 100644 OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c

diff --git a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c
index 613a8ac97f..abd1f550d4 100644
--- a/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c
+++ b/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c
@@ -29,5 +29,9 @@ InstallAcpiTables (
EFI_STATUS Status;

Status = InstallQemuFwCfgTables (AcpiTable);
+ if (EFI_ERROR (Status)) {
+ Status = InstallCloudHvTables (AcpiTable);
+ }
Same here, I think you should use the host bridge pcd.

take care,
Gerd