From c916a0cf83e21058a4d466fb3b1c8c6d71702994 Mon Sep 17 00:00:00 2001 From: Saravanan D Date: Tue, 7 Apr 2026 15:07:41 -0700 Subject: [PATCH] ci: fix aarch64 firmware crash with multiple PCI segments The aarch64 UEFI firmware uses FdtPciHostBridgeLib to discover PCI host bridges from the device tree. This library asserts that only one pci-host-ecam- generic FDT node exists. Cloud-hypervisor generates one node per PCI segment, so when we launch a guest with num_pci_segments > 1 the DEBUG firmware hits the assert and terminates. This assert is aarch64 specific since amd64 does not use FDT for PCI discovery. FdtPciHostBridgeLib only enumerates the first PCI host bridge (segment 0) regardless of build type. Segments 1-95 are not visible to UEFI. This is not a functional problem because: - Cloud-hypervisor provides ACPI tables (MCFG, DSDT) describing all segments directly to the guest via CloudHvAcpiPlatformDxe - The Linux kernel re-enumerates PCI from the MCFG table and assigns BARs independently - Boot devices (virtio-blk, virtio-net) reside on segment 0 which UEFI does enumerate Switch both amd64 and aarch64 builds from DEBUG to RELEASE. Signed-off-by: Saravanan D --- .github/workflows/release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ef2446139bd4..3c95008dc2ad 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,13 +27,13 @@ jobs: run: | source edksetup.sh make -C BaseTools - OvmfPkg/build.sh -p OvmfPkg/CloudHv/CloudHvX64.dsc -a X64 -b DEBUG + OvmfPkg/build.sh -p OvmfPkg/CloudHv/CloudHvX64.dsc -a X64 -b RELEASE - name: Upload x86-64 artifact if: github.event_name == 'create' && github.event.ref_type == 'tag' uses: actions/upload-artifact@v4 with: name: cloudhv-x64 - path: Build/CloudHvX64/DEBUG_GCC/FV/CLOUDHV.fd + path: Build/CloudHvX64/RELEASE_GCC/FV/CLOUDHV.fd build-aarch64: name: Build AArch64 @@ -52,14 +52,14 @@ jobs: source edksetup.sh make -C BaseTools export GCC_AARCH64_PREFIX=aarch64-linux-gnu- - build -p ArmVirtPkg/ArmVirtCloudHv.dsc -a AARCH64 -t GCC -b DEBUG \ + build -p ArmVirtPkg/ArmVirtCloudHv.dsc -a AARCH64 -t GCC -b RELEASE \ --pcd gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy=0xC000000000007FD1 - name: Upload AArch64 artifact if: github.event_name == 'create' && github.event.ref_type == 'tag' uses: actions/upload-artifact@v4 with: name: cloudhv-aarch64 - path: Build/ArmVirtCloudHv-AARCH64/DEBUG_GCC/FV/CLOUDHV_EFI.fd + path: Build/ArmVirtCloudHv-AARCH64/RELEASE_GCC/FV/CLOUDHV_EFI.fd release: name: Release