aboutsummaryrefslogtreecommitdiffstats
path: root/tests/qtest/lpc-ich9-test.c
diff options
context:
space:
mode:
authorTimos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>2023-10-10 11:40:56 +0000
committerTimos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>2023-10-10 11:40:56 +0000
commite02cda008591317b1625707ff8e115a4841aa889 (patch)
treeaee302e3cf8b59ec2d32ec481be3d1afddfc8968 /tests/qtest/lpc-ich9-test.c
parentcc668e6b7e0ffd8c9d130513d12053cf5eda1d3b (diff)
Introduce Virtio-loopback epsilon release:
Epsilon release introduces a new compatibility layer which make virtio-loopback design to work with QEMU and rust-vmm vhost-user backend without require any changes. Signed-off-by: Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com> Change-Id: I52e57563e08a7d0bdc002f8e928ee61ba0c53dd9
Diffstat (limited to 'tests/qtest/lpc-ich9-test.c')
-rw-r--r--tests/qtest/lpc-ich9-test.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/qtest/lpc-ich9-test.c b/tests/qtest/lpc-ich9-test.c
new file mode 100644
index 000000000..fe0bef998
--- /dev/null
+++ b/tests/qtest/lpc-ich9-test.c
@@ -0,0 +1,41 @@
+/*
+ * QTest testcases for ich9 case
+ *
+ * Copyright (c) 2020 Li Qiang <liq3ea@gmail.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+
+#include "libqos/libqtest.h"
+
+static void test_lp1878642_pci_bus_get_irq_level_assert(void)
+{
+ QTestState *s;
+
+ s = qtest_init("-M pc-q35-5.0 "
+ "-nographic -monitor none -serial none");
+
+ qtest_outl(s, 0xcf8, 0x8000f840); /* PMBASE */
+ qtest_outl(s, 0xcfc, 0x5d00);
+ qtest_outl(s, 0xcf8, 0x8000f844); /* ACPI_CTRL */
+ qtest_outl(s, 0xcfc, 0xeb);
+ qtest_outw(s, 0x5d02, 0x205d);
+ qtest_quit(s);
+}
+
+int main(int argc, char **argv)
+{
+ const char *arch = qtest_get_arch();
+
+ g_test_init(&argc, &argv, NULL);
+
+ if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
+ qtest_add_func("ich9/test_lp1878642_pci_bus_get_irq_level_assert",
+ test_lp1878642_pci_bus_get_irq_level_assert);
+ }
+
+ return g_test_run();
+}