Skip to content

Commit e425c4f

Browse files
committed
ArmVirtPkg: Kvmtool: Only install IORT if ITS is present
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]>
1 parent 44104e2 commit e425c4f

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

ArmVirtPkg/KvmtoolCfgMgrDxe/ConfigurationManager.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @file
22
Configuration Manager Dxe
33
4-
Copyright (c) 2021 - 2022, Arm Limited. All rights reserved.<BR>
4+
Copyright (c) 2021 - 2024, Arm Limited. All rights reserved.<BR>
55
66
SPDX-License-Identifier: BSD-2-Clause-Patent
77
@@ -712,6 +712,22 @@ GetStandardNameSpaceObject (
712712
// IORT is only required for GicV3/4
713713
//
714714
AcpiTableCount -= 1;
715+
} else {
716+
//
717+
// Check if we have support for ITS.
718+
//
719+
Status = DynamicPlatRepoGetObject (
720+
PlatformRepo->DynamicPlatformRepo,
721+
CREATE_CM_ARM_OBJECT_ID (EArmObjGicItsInfo),
722+
CM_NULL_TOKEN,
723+
&CmObjDesc
724+
);
725+
if (EFI_ERROR (Status)) {
726+
//
727+
// IORT is only required for GicV3/4 if ITS is present.
728+
//
729+
AcpiTableCount -= 1;
730+
}
715731
}
716732
}
717733

0 commit comments

Comments
 (0)