Skip to content

Commit

Permalink
ArmVirtPkg: Kvmtool: Only install IORT if ITS is present
Browse files Browse the repository at this point in the history
When the Kvmtool guest is launched without ITS support
i.e. when --irq-chip=gicv3-its option is not specified
or if --irq-chip=gicv3 is specified, the guest VM does
not have an ITS.

In such scenarios the guest firmware must not install
the IORT table. Therefore, add checks to see if ITS is
present before installing the IORT ACPI table.

Cc: Ard Biesheuvel <[email protected]>
Cc: Leif Lindholm <[email protected]>
Cc: Gerd Hoffmann <[email protected]>
Signed-off-by: Sami Mujawar <[email protected]>
  • Loading branch information
samimujawar committed Nov 27, 2024
1 parent 2777459 commit a51539a
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file
Configuration Manager Dxe
Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>
Copyright (c) 2021 - 2024, Arm Limited. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
Expand Down Expand Up @@ -699,6 +699,22 @@ GetStandardNameSpaceObject (
// IORT is only required for GicV3/4
//
AcpiTableCount -= 1;
} else {
//
// Check if we have support for ITS.
//
Status = DynamicPlatRepoGetObject (
PlatformRepo->DynamicPlatformRepo,
CREATE_CM_ARM_OBJECT_ID (EArmObjGicItsInfo),
CM_NULL_TOKEN,
&CmObjDesc
);
if (EFI_ERROR (Status)) {
//
// IORT is only required for GicV3/4 if ITS is present.
//
AcpiTableCount -= 1;
}
}

Status = HandleCmObject (
Expand Down

0 comments on commit a51539a

Please sign in to comment.