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