From: Gustavo Romero <gustavo.romero@linaro.org>
To: qemu-devel@nongnu.org, eric.auger@redhat.com, philmd@linaro.org,
mst@redhat.com
Cc: qemu-arm@nongnu.org, alex.bennee@linaro.org,
gustavo.romero@linaro.org, udo@hypervisor.org,
ajones@ventanamicro.com, peter.maydell@linaro.org,
imammedo@redhat.com, anisinha@redhat.com
Subject: [PATCH v6 6/9] qtest/bios-tables-test: Add test for when ITS is off on aarch64
Date: Sat, 28 Jun 2025 19:57:19 +0000 [thread overview]
Message-ID: <20250628195722.977078-7-gustavo.romero@linaro.org> (raw)
In-Reply-To: <20250628195722.977078-1-gustavo.romero@linaro.org>
From: Philippe Mathieu-Daudé <philmd@linaro.org>
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>
---
tests/qtest/bios-tables-test-allowed-diff.h | 2 ++
tests/qtest/bios-tables-test.c | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index dfb8523c8b..a88198d5c2 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/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",
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 0b2bdf9d0d..4dbc07ec5e 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/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);
--
2.34.1
next prev parent reply other threads:[~2025-06-28 19:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-28 19:57 [PATCH-for-10.1 v6 0/9] hw/arm: GIC 'its=off' ACPI table fixes Gustavo Romero
2025-06-28 19:57 ` [PATCH v6 1/9] hw/intc/gicv3_its: Do not check its_class_name() Gustavo Romero
2025-06-28 19:57 ` [PATCH v6 2/9] hw/arm/virt: Simplify logic for setting instance's 'tcg_its' variable Gustavo Romero
2025-06-28 19:57 ` [PATCH v6 3/9] hw/arm/virt: Simplify create_its() Gustavo Romero
2025-06-28 19:57 ` [PATCH v6 4/9] hw/arm/virt-acpi-build: Improve comment in build_iort Gustavo Romero
2025-06-28 19:57 ` [PATCH v6 5/9] hw/arm/virt-acpi-build: Factor out create_its_idmaps Gustavo Romero
2025-06-28 19:57 ` Gustavo Romero [this message]
2025-06-28 19:57 ` [PATCH v6 7/9] qtest/bios-tables-test: Add blobs for its=off test on aarch64 Gustavo Romero
2025-06-28 19:57 ` [PATCH v6 8/9] hw/arm/virt-acpi-build: Fix ACPI IORT and MADT tables when its=off Gustavo Romero
2025-07-02 8:34 ` Shameerali Kolothum Thodi via
2025-07-03 8:53 ` Shameerali Kolothum Thodi via
2025-06-28 19:57 ` [PATCH v6 9/9] qtest/bios-tables-test: Update blobs for its=off test on aarch64 Gustavo Romero
2025-06-30 16:16 ` [PATCH-for-10.1 v6 0/9] hw/arm: GIC 'its=off' ACPI table fixes Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250628195722.977078-7-gustavo.romero@linaro.org \
--to=gustavo.romero@linaro.org \
--cc=ajones@ventanamicro.com \
--cc=alex.bennee@linaro.org \
--cc=anisinha@redhat.com \
--cc=eric.auger@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=udo@hypervisor.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).