diff mbox series

[RFC,2/3] tests: acpi: q35: test for x2APIC entries in SRAT

Message ID 20210616152455.1270264-3-imammedo@redhat.com (mailing list archive)
State New, archived
Headers show
Series qtest: pick tests that require KVM at runtime | expand

Commit Message

Igor Mammedov June 16, 2021, 3:24 p.m. UTC
Set -smp 1,maxcpus=288 to test for ACPI code that
deal with CPUs with large APIC ID (>255).

PS:
Test requires KVM and in-kernel irqchip support,
so skip test if KVM is not available.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
 tests/qtest/bios-tables-test-allowed-diff.h |  4 ++++
 tests/data/acpi/q35/APIC.numamem            |  0
 tests/data/acpi/q35/FACP.numamem            |  0
 tests/qtest/bios-tables-test.c              | 10 +++++++---
 4 files changed, 11 insertions(+), 3 deletions(-)
 create mode 100644 tests/data/acpi/q35/APIC.numamem
 create mode 100644 tests/data/acpi/q35/FACP.numamem
diff mbox series

Patch

diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index dfb8523c8b..c4c132e49b 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1 +1,5 @@ 
 /* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/q35/DSDT.numamem",
+"tests/data/acpi/q35/SRAT.numamem",
+"tests/data/acpi/q35/FACP.numamem",
+"tests/data/acpi/q35/APIC.numamem",
diff --git a/tests/data/acpi/q35/APIC.numamem b/tests/data/acpi/q35/APIC.numamem
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/data/acpi/q35/FACP.numamem b/tests/data/acpi/q35/FACP.numamem
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
index 51d3a4e239..3ecf7d0d58 100644
--- a/tests/qtest/bios-tables-test.c
+++ b/tests/qtest/bios-tables-test.c
@@ -1021,7 +1021,7 @@  static void test_acpi_piix4_tcg_nohpet(void)
     free_test_data(&data);
 }
 
-static void test_acpi_q35_tcg_numamem(void)
+static void test_acpi_q35_kvm_numamem(void)
 {
     test_data data;
 
@@ -1029,7 +1029,9 @@  static void test_acpi_q35_tcg_numamem(void)
     data.machine = MACHINE_Q35;
     data.variant = ".numamem";
     test_acpi_one(" -object memory-backend-ram,id=ram0,size=128M"
-                  " -numa node -numa node,memdev=ram0", &data);
+                  " -numa node -numa node,memdev=ram0"
+                  " -machine kernel-irqchip=on -smp 1,maxcpus=288"
+                   , &data);
     free_test_data(&data);
 }
 
@@ -1536,7 +1538,6 @@  int main(int argc, char *argv[])
         qtest_add_func("acpi/piix4/memhp", test_acpi_piix4_tcg_memhp);
         qtest_add_func("acpi/q35/memhp", test_acpi_q35_tcg_memhp);
         qtest_add_func("acpi/piix4/numamem", test_acpi_piix4_tcg_numamem);
-        qtest_add_func("acpi/q35/numamem", test_acpi_q35_tcg_numamem);
         qtest_add_func("acpi/piix4/nosmm", test_acpi_piix4_tcg_nosmm);
         qtest_add_func("acpi/piix4/smm-compat",
                        test_acpi_piix4_tcg_smm_compat);
@@ -1561,6 +1562,9 @@  int main(int argc, char *argv[])
         if (strcmp(arch, "x86_64") == 0) {
             qtest_add_func("acpi/microvm/pcie", test_acpi_microvm_pcie_tcg);
         }
+        if (qtest_has_kvm()) {
+            qtest_add_func("acpi/q35/numamem", test_acpi_q35_kvm_numamem);
+        }
     } else if (strcmp(arch, "aarch64") == 0) {
         qtest_add_func("acpi/virt", test_acpi_virt_tcg);
         qtest_add_func("acpi/virt/numamem", test_acpi_virt_tcg_numamem);