|
|
0727d3 |
From 341715473c2a71f11a3888420a0caecf27ed4eb5 Mon Sep 17 00:00:00 2001
|
|
|
0727d3 |
From: Jon Maloy <jmaloy@redhat.com>
|
|
|
0727d3 |
Date: Wed, 30 Mar 2022 14:52:34 -0400
|
|
|
0727d3 |
Subject: [PATCH 11/18] tests: acpi: add SLIC table test
|
|
|
0727d3 |
|
|
|
0727d3 |
RH-Author: Jon Maloy <jmaloy@redhat.com>
|
|
|
0727d3 |
RH-MergeRequest: 141: acpi: fix QEMU crash when started with SLIC table
|
|
|
0727d3 |
RH-Commit: [3/10] baac9b82c16a50eb4640fd7146775c9d507c7b21 (jmaloy/qemu-kvm)
|
|
|
0727d3 |
RH-Bugzilla: 2062611
|
|
|
0727d3 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
0727d3 |
|
|
|
0727d3 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2062611
|
|
|
0727d3 |
Upstream: Merged
|
|
|
0727d3 |
|
|
|
0727d3 |
commit 11edfabee443b149468a82b5efc88c96d1d259ec
|
|
|
0727d3 |
Author: Igor Mammedov <imammedo@redhat.com>
|
|
|
0727d3 |
Date: Mon Dec 27 14:31:19 2021 -0500
|
|
|
0727d3 |
|
|
|
0727d3 |
tests: acpi: add SLIC table test
|
|
|
0727d3 |
|
|
|
0727d3 |
When user uses '-acpitable' to add SLIC table, some ACPI
|
|
|
0727d3 |
tables (FADT) will change its 'Oem ID'/'Oem Table ID' fields to
|
|
|
0727d3 |
match that of SLIC. Test makes sure thati QEMU handles
|
|
|
0727d3 |
those fields correctly when SLIC table is added with
|
|
|
0727d3 |
'-acpitable' option.
|
|
|
0727d3 |
|
|
|
0727d3 |
Conflicts: tests/qtest/bios-tables-test.c
|
|
|
0727d3 |
due to missing 39d7554b2009 ("tests/acpi: add test case for VIOT")
|
|
|
0727d3 |
|
|
|
0727d3 |
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
0727d3 |
Message-Id: <20211227193120.1084176-4-imammedo@redhat.com>
|
|
|
0727d3 |
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
0727d3 |
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
0727d3 |
|
|
|
0727d3 |
(cherry picked from commit 11edfabee443b149468a82b5efc88c96d1d259ec)
|
|
|
0727d3 |
Signed-off-by: Jon Maloy <jmaloy@redhat.com>
|
|
|
0727d3 |
---
|
|
|
0727d3 |
tests/qtest/bios-tables-test.c | 15 +++++++++++++++
|
|
|
0727d3 |
1 file changed, 15 insertions(+)
|
|
|
0727d3 |
|
|
|
0727d3 |
diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c
|
|
|
0727d3 |
index 16d8304cde..e159b71136 100644
|
|
|
0727d3 |
--- a/tests/qtest/bios-tables-test.c
|
|
|
0727d3 |
+++ b/tests/qtest/bios-tables-test.c
|
|
|
0727d3 |
@@ -1467,6 +1467,20 @@ static void test_acpi_virt_tcg(void)
|
|
|
0727d3 |
free_test_data(&data);
|
|
|
0727d3 |
}
|
|
|
0727d3 |
|
|
|
0727d3 |
+static void test_acpi_q35_slic(void)
|
|
|
0727d3 |
+{
|
|
|
0727d3 |
+ test_data data = {
|
|
|
0727d3 |
+ .machine = MACHINE_Q35,
|
|
|
0727d3 |
+ .variant = ".slic",
|
|
|
0727d3 |
+ };
|
|
|
0727d3 |
+
|
|
|
0727d3 |
+ test_acpi_one("-acpitable sig=SLIC,oem_id='CRASH ',oem_table_id='ME',"
|
|
|
0727d3 |
+ "oem_rev=00002210,asl_compiler_id='qemu',"
|
|
|
0727d3 |
+ "asl_compiler_rev=00000000,data=/dev/null",
|
|
|
0727d3 |
+ &data);
|
|
|
0727d3 |
+ free_test_data(&data);
|
|
|
0727d3 |
+}
|
|
|
0727d3 |
+
|
|
|
0727d3 |
static void test_oem_fields(test_data *data)
|
|
|
0727d3 |
{
|
|
|
0727d3 |
int i;
|
|
|
0727d3 |
@@ -1641,6 +1655,7 @@ int main(int argc, char *argv[])
|
|
|
0727d3 |
qtest_add_func("acpi/q35/kvm/xapic", test_acpi_q35_kvm_xapic);
|
|
|
0727d3 |
qtest_add_func("acpi/q35/kvm/dmar", test_acpi_q35_kvm_dmar);
|
|
|
0727d3 |
}
|
|
|
0727d3 |
+ qtest_add_func("acpi/q35/slic", test_acpi_q35_slic);
|
|
|
0727d3 |
} else if (strcmp(arch, "aarch64") == 0) {
|
|
|
0727d3 |
if (has_tcg) {
|
|
|
0727d3 |
qtest_add_func("acpi/virt", test_acpi_virt_tcg);
|
|
|
0727d3 |
--
|
|
|
0727d3 |
2.27.0
|
|
|
0727d3 |
|