Lines Matching +full:build +full:- +full:disabled

9  * See the COPYING file in the top-level directory.
18 * We expect the SVE max-vq to be 16. Also it must be <= 64
23 #define MACHINE "-machine virt,gic-version=max -accel tcg "
24 #define MACHINE_KVM "-machine virt,gic-version=max -accel kvm "
25 #define QUERY_HEAD "{ 'execute': 'query-cpu-model-expansion', " \
191 resp = qtest_qmp(qts, "{ 'execute': 'query-cpu-model-expansion', " in assert_type_full()
207 resp = qtest_qmp(qts, "{ 'execute': 'query-cpu-model-expansion', " in assert_bad_props()
234 if (strlen(e->key) > 3 && !strncmp(e->key, "sve", 3) && in resp_get_sve_vls()
235 g_ascii_isdigit(e->key[3])) { in resp_get_sve_vls()
239 bits = g_ascii_strtoll(&e->key[3], &endptr, 10); in resp_get_sve_vls()
244 if (qdict_get_bool(props, e->key)) { in resp_get_sve_vls()
245 vls |= BIT_ULL((bits / 128) - 1); in resp_get_sve_vls()
268 * With no sve-max-vq or sve<N> properties on the command line in sve_tests_default()
272 assert_sve_vls(qts, cpu_type, BIT_ULL(SVE_MAX_VQ) - 1, NULL); in sve_tests_default()
282 assert_sve_vls(qts, cpu_type, ((BIT_ULL(SVE_MAX_VQ) - 1) & ~BIT_ULL(2)), in sve_tests_default()
286 * --------------------------------------------------------------------- in sve_tests_default()
287 * power-of-two(vq) all-power- can can in sve_tests_default()
288 * of-two(< vq) enable disable in sve_tests_default()
289 * --------------------------------------------------------------------- in sve_tests_default()
292 * --------------------------------------------------------------------- in sve_tests_default()
294 * --------------------------------------------------------------------- in sve_tests_default()
297 * --------------------------------------------------------------------- in sve_tests_default()
308 /* max_vq := 8, vq < max_vq, !power-of-two(vq) */ in sve_tests_default()
314 /* max_vq := 8, vq < max_vq, power-of-two(vq) */ in sve_tests_default()
320 /* max_vq := 3, vq > max_vq, !all-power-of-two(< vq) */ in sve_tests_default()
325 * We can disable power-of-two vector lengths when all larger lengths in sve_tests_default()
326 * are also disabled. We only need to disable the power-of-two length, in sve_tests_default()
327 * as all non-enabled larger lengths will then be auto-disabled. in sve_tests_default()
331 /* max_vq := 3, vq > max_vq, all-power-of-two(< vq) */ in sve_tests_default()
342 qts = qtest_init(MACHINE "-cpu max,sve-max-vq=8"); in sve_tests_sve_max_vq_8()
344 assert_sve_vls(qts, "max", BIT_ULL(8) - 1, NULL); in sve_tests_sve_max_vq_8()
347 * Disabling the max-vq set by sve-max-vq is not allowed, but in sve_tests_sve_max_vq_8()
354 * Enabling anything larger than max-vq set by sve-max-vq is not in sve_tests_sve_max_vq_8()
361 * We can enable/disable non power-of-two lengths smaller than the in sve_tests_sve_max_vq_8()
362 * max-vq set by sve-max-vq, but, while we can enable power-of-two in sve_tests_sve_max_vq_8()
377 qts = qtest_init(MACHINE "-cpu max,sve=off"); in sve_tests_sve_off()
388 /* With SVE re-enabled we should get all vector lengths enabled. */ in sve_tests_sve_off()
389 assert_sve_vls(qts, "max", BIT_ULL(SVE_MAX_VQ) - 1, "{ 'sve': true }"); in sve_tests_sve_off()
402 qts = qtest_init(MACHINE_KVM "-cpu max,sve=off"); in sve_tests_sve_off_kvm()
407 * everything is disabled (as it should be with sve=off) in sve_tests_sve_off_kvm()
420 assert_has_feature_disabled(qts, cpu_type, "pauth-impdef"); in pauth_tests_default()
421 assert_has_feature_disabled(qts, cpu_type, "pauth-qarma3"); in pauth_tests_default()
422 assert_has_feature_disabled(qts, cpu_type, "pauth-qarma5"); in pauth_tests_default()
425 assert_set_feature(qts, cpu_type, "pauth-impdef", true); in pauth_tests_default()
426 assert_set_feature(qts, cpu_type, "pauth-impdef", false); in pauth_tests_default()
427 assert_set_feature(qts, cpu_type, "pauth-qarma3", true); in pauth_tests_default()
428 assert_set_feature(qts, cpu_type, "pauth-qarma3", false); in pauth_tests_default()
429 assert_set_feature(qts, cpu_type, "pauth-qarma5", true); in pauth_tests_default()
430 assert_set_feature(qts, cpu_type, "pauth-qarma5", false); in pauth_tests_default()
432 "cannot enable pauth-impdef, pauth-qarma3 or pauth-qarma5 without pauth", in pauth_tests_default()
433 "{ 'pauth': false, 'pauth-impdef': true }"); in pauth_tests_default()
435 "cannot enable pauth-impdef, pauth-qarma3 or pauth-qarma5 without pauth", in pauth_tests_default()
436 "{ 'pauth': false, 'pauth-qarma3': true }"); in pauth_tests_default()
438 "cannot enable pauth-impdef, pauth-qarma3 or pauth-qarma5 without pauth", in pauth_tests_default()
439 "{ 'pauth': false, 'pauth-qarma5': true }"); in pauth_tests_default()
441 "cannot enable pauth-impdef, pauth-qarma3 and pauth-qarma5 at the same time", in pauth_tests_default()
442 "{ 'pauth': true, 'pauth-impdef': true, 'pauth-qarma3': true," in pauth_tests_default()
443 " 'pauth-qarma5': true }"); in pauth_tests_default()
450 qts = qtest_init(MACHINE "-cpu max"); in test_query_cpu_model_expansion()
452 /* Test common query-cpu-model-expansion input validation */ in test_query_cpu_model_expansion()
457 assert_error(qts, "max", "Parameter 'model.props.not-a-prop' is unexpected", in test_query_cpu_model_expansion()
458 "{ 'not-a-prop': false }"); in test_query_cpu_model_expansion()
462 assert_has_feature_enabled(qts, "cortex-a15", "pmu"); in test_query_cpu_model_expansion()
463 assert_has_not_feature(qts, "cortex-a15", "aarch64"); in test_query_cpu_model_expansion()
470 assert_has_not_feature(qts, "max", "kvm-no-adjvtime"); in test_query_cpu_model_expansion()
471 assert_has_not_feature(qts, "max", "kvm-steal-time"); in test_query_cpu_model_expansion()
477 assert_has_feature_enabled(qts, "cortex-a57", "pmu"); in test_query_cpu_model_expansion()
478 assert_has_feature_enabled(qts, "cortex-a57", "aarch64"); in test_query_cpu_model_expansion()
498 "'aarch64' feature cannot be disabled " in test_query_cpu_model_expansion()
499 "unless KVM is enabled and 32-bit EL1 " in test_query_cpu_model_expansion()
511 qts = qtest_init(MACHINE_KVM "-cpu max"); in test_query_cpu_model_expansion_kvm()
513 /* Enabling and disabling kvm-no-adjvtime should always work. */ in test_query_cpu_model_expansion_kvm()
514 assert_has_feature_disabled(qts, "host", "kvm-no-adjvtime"); in test_query_cpu_model_expansion_kvm()
515 assert_set_feature(qts, "host", "kvm-no-adjvtime", true); in test_query_cpu_model_expansion_kvm()
516 assert_set_feature(qts, "host", "kvm-no-adjvtime", false); in test_query_cpu_model_expansion_kvm()
534 assert_error(qts, "cortex-a7", in test_query_cpu_model_expansion_kvm()
535 "We cannot guarantee the CPU type 'cortex-a7' works " in test_query_cpu_model_expansion_kvm()
539 * With a KVM-only build the 32-bit CPUs are not present. in test_query_cpu_model_expansion_kvm()
541 assert_error(qts, "cortex-a7", in test_query_cpu_model_expansion_kvm()
542 "The CPU type 'cortex-a7' is not a " in test_query_cpu_model_expansion_kvm()
549 * Some features would be enabled by default, but they're disabled in test_query_cpu_model_expansion_kvm()
553 assert_has_feature(qts, "host", "kvm-steal-time"); in test_query_cpu_model_expansion_kvm()
558 kvm_supports_steal_time = resp_get_feature(resp, "kvm-steal-time"); in test_query_cpu_model_expansion_kvm()
570 /* If we have steal-time then we should be able to toggle it. */ in test_query_cpu_model_expansion_kvm()
571 assert_set_feature(qts, "host", "kvm-steal-time", false); in test_query_cpu_model_expansion_kvm()
572 assert_set_feature(qts, "host", "kvm-steal-time", true); in test_query_cpu_model_expansion_kvm()
577 max_vq = 64 - __builtin_clzll(vls); in test_query_cpu_model_expansion_kvm()
583 /* Get the next supported length smaller than max-vq. */ in test_query_cpu_model_expansion_kvm()
584 vq = 64 - __builtin_clzll(vls & ~BIT_ULL(max_vq - 1)); in test_query_cpu_model_expansion_kvm()
587 * We have at least one length smaller than max-vq, in test_query_cpu_model_expansion_kvm()
588 * so we can disable max-vq. in test_query_cpu_model_expansion_kvm()
590 assert_sve_vls(qts, "host", (vls & ~BIT_ULL(max_vq - 1)), in test_query_cpu_model_expansion_kvm()
594 * Smaller, supported vector lengths cannot be disabled in test_query_cpu_model_expansion_kvm()
596 * disabled. in test_query_cpu_model_expansion_kvm()
618 if (!(vls & BIT_ULL(vq - 1))) { in test_query_cpu_model_expansion_kvm()
635 assert_has_not_feature(qts, "host", "kvm-steal-time"); in test_query_cpu_model_expansion_kvm()
650 qtest_add_data_func("/arm/query-cpu-model-expansion", in main()
668 qtest_add_data_func("/arm/kvm/query-cpu-model-expansion", in main()
671 qtest_add_data_func("/arm/kvm/query-cpu-model-expansion/sve-off", in main()
676 qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-max-vq-8", in main()
678 qtest_add_data_func("/arm/max/query-cpu-model-expansion/sve-off", in main()