[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 29/30] tests/qtest: arm-cpu-features: Match tests to required acce
From: |
Peter Maydell |
Subject: |
[PULL 29/30] tests/qtest: arm-cpu-features: Match tests to required accelerators |
Date: |
Thu, 16 Feb 2023 17:11:22 +0000 |
From: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
tests/qtest/arm-cpu-features.c | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c
index 8691802950c..1cb08138ad1 100644
--- a/tests/qtest/arm-cpu-features.c
+++ b/tests/qtest/arm-cpu-features.c
@@ -21,7 +21,7 @@
#define SVE_MAX_VQ 16
#define MACHINE "-machine virt,gic-version=max -accel tcg "
-#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm -accel tcg "
+#define MACHINE_KVM "-machine virt,gic-version=max -accel kvm "
#define QUERY_HEAD "{ 'execute': 'query-cpu-model-expansion', " \
" 'arguments': { 'type': 'full', "
#define QUERY_TAIL "}}"
@@ -607,31 +607,39 @@ int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
- qtest_add_data_func("/arm/query-cpu-model-expansion",
- NULL, test_query_cpu_model_expansion);
+ if (qtest_has_accel("tcg")) {
+ qtest_add_data_func("/arm/query-cpu-model-expansion",
+ NULL, test_query_cpu_model_expansion);
+ }
+
+ if (!g_str_equal(qtest_get_arch(), "aarch64")) {
+ goto out;
+ }
/*
* For now we only run KVM specific tests with AArch64 QEMU in
* order avoid attempting to run an AArch32 QEMU with KVM on
* AArch64 hosts. That won't work and isn't easy to detect.
*/
- if (g_str_equal(qtest_get_arch(), "aarch64") && qtest_has_accel("kvm")) {
+ if (qtest_has_accel("kvm")) {
/*
* This tests target the 'host' CPU type, so register it only if
* KVM is available.
*/
qtest_add_data_func("/arm/kvm/query-cpu-model-expansion",
NULL, test_query_cpu_model_expansion_kvm);
- }
- if (g_str_equal(qtest_get_arch(), "aarch64")) {
- qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-max-vq-8",
- NULL, sve_tests_sve_max_vq_8);
- qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-off",
- NULL, sve_tests_sve_off);
qtest_add_data_func("/arm/kvm/query-cpu-model-expansion/sve-off",
NULL, sve_tests_sve_off_kvm);
}
+ if (qtest_has_accel("tcg")) {
+ qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-max-vq-8",
+ NULL, sve_tests_sve_max_vq_8);
+ qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-off",
+ NULL, sve_tests_sve_off);
+ }
+
+out:
return g_test_run();
}
--
2.34.1
- [PULL 19/30] hw/arm/smmu-common: Support 64-bit addresses, (continued)
- [PULL 19/30] hw/arm/smmu-common: Support 64-bit addresses, Peter Maydell, 2023/02/16
- [PULL 20/30] hw/arm/smmu-common: Fix TTB1 handling, Peter Maydell, 2023/02/16
- [PULL 21/30] target/arm: rename handle_semihosting to tcg_handle_semihosting, Peter Maydell, 2023/02/16
- [PULL 22/30] target/arm: wrap psci call with tcg_enabled, Peter Maydell, 2023/02/16
- [PULL 23/30] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled(), Peter Maydell, 2023/02/16
- [PULL 25/30] target/arm: Move cpregs code out of cpu.h, Peter Maydell, 2023/02/16
- [PULL 26/30] tests/avocado: Skip tests that require a missing accelerator, Peter Maydell, 2023/02/16
- [PULL 28/30] target/arm: Use "max" as default cpu for the virt machine with KVM, Peter Maydell, 2023/02/16
- [PULL 24/30] target/arm: Move PC alignment check, Peter Maydell, 2023/02/16
- [PULL 27/30] tests/avocado: Tag TCG tests with accel:tcg, Peter Maydell, 2023/02/16
- [PULL 29/30] tests/qtest: arm-cpu-features: Match tests to required accelerators,
Peter Maydell <=
- [PULL 30/30] tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG, Peter Maydell, 2023/02/16
- Re: [PULL 00/30] target-arm queue, Peter Maydell, 2023/02/20