Browse Source

qtest/bios-tables-test: Add test for when ITS is off on aarch64

Arm64 GIC ITS (Interrupt Translation Service) is an optional piece of
hardware introduced in GICv3 and, being optional, it can be disabled
in QEMU aarch64 VMs that support it using machine option "its=off",
like, for instance: "-M virt,its=off".

In ACPI, the ITS is advertised, if present, in the MADT (aka APIC)
table, while the ID mappings from the Root Complex (RC) and from the
SMMU nodes to the ITS Group nodes are described in the IORT table.

This new test verifies that when the "its=off" option is passed to the
machine the ITS-related data is correctly pruned from the ACPI tables.

The new blobs for this test will be added in a following commit.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Message-id: 20250628195722.977078-7-gustavo.romero@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
pull/292/head
Philippe Mathieu-Daudé 9 months ago
committed by Peter Maydell
parent
commit
f63c6c23fb
  1. 2
      tests/qtest/bios-tables-test-allowed-diff.h
  2. 21
      tests/qtest/bios-tables-test.c

2
tests/qtest/bios-tables-test-allowed-diff.h

@ -1 +1,3 @@
/* List of comma-separated changed AML files to ignore */
"tests/data/acpi/aarch64/virt/APIC.its_off",
"tests/data/acpi/aarch64/virt/IORT.its_off",

21
tests/qtest/bios-tables-test.c

@ -2146,6 +2146,25 @@ static void test_acpi_aarch64_virt_tcg_topology(void)
free_test_data(&data);
}
static void test_acpi_aarch64_virt_tcg_its_off(void)
{
test_data data = {
.machine = "virt",
.arch = "aarch64",
.variant = ".its_off",
.tcg_only = true,
.uefi_fl1 = "pc-bios/edk2-aarch64-code.fd",
.uefi_fl2 = "pc-bios/edk2-arm-vars.fd",
.cd = "tests/data/uefi-boot-images/bios-tables-test.aarch64.iso.qcow2",
.ram_start = 0x40000000ULL,
.scan_len = 128ULL * 1024 * 1024,
};
test_acpi_one("-cpu cortex-a57 "
"-M gic-version=3,iommu=smmuv3,its=off", &data);
free_test_data(&data);
}
static void test_acpi_q35_viot(void)
{
test_data data = {
@ -2577,6 +2596,8 @@ int main(int argc, char *argv[])
test_acpi_aarch64_virt_tcg_acpi_hmat);
qtest_add_func("acpi/virt/topology",
test_acpi_aarch64_virt_tcg_topology);
qtest_add_func("acpi/virt/its_off",
test_acpi_aarch64_virt_tcg_its_off);
qtest_add_func("acpi/virt/numamem",
test_acpi_aarch64_virt_tcg_numamem);
qtest_add_func("acpi/virt/memhp", test_acpi_aarch64_virt_tcg_memhp);

Loading…
Cancel
Save