diff options
author | Peter Maydell | 2020-10-08 22:41:20 +0200 |
---|---|---|
committer | Peter Maydell | 2020-10-08 22:41:20 +0200 |
commit | 497d415d76b9f59fcae27f22df1ca2c3fa4df64e (patch) | |
tree | e4c09699e7ad90a4ae2d2ece477c25a6569420e5 /tests | |
parent | Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20201008' into staging (diff) | |
parent | target/arm: Make '-cpu max' have a 48-bit PA (diff) | |
download | qemu-497d415d76b9f59fcae27f22df1ca2c3fa4df64e.tar.gz qemu-497d415d76b9f59fcae27f22df1ca2c3fa4df64e.tar.xz qemu-497d415d76b9f59fcae27f22df1ca2c3fa4df64e.zip |
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20201008-1' into staging
target-arm queue:
* hw/ssi/npcm7xx_fiu: Fix handling of unsigned integer
* hw/arm/fsl-imx25: Fix a typo
* hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
* hw/arm/sbsa-ref : allocate IRQs for SMMUv3
* hw/char/bcm2835_aux: Allow less than 32-bit accesses
* hw/arm/virt: Implement kvm-steal-time
* target/arm: Make '-cpu max' have a 48-bit PA
# gpg: Signature made Thu 08 Oct 2020 21:40:31 BST
# gpg: using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg: issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83 15CF 3C25 25ED 1436 0CDE
* remotes/pmaydell/tags/pull-target-arm-20201008-1:
target/arm: Make '-cpu max' have a 48-bit PA
hw/arm/virt: Implement kvm-steal-time
tests/qtest: Restore aarch64 arm-cpu-features test
hw/arm/virt: Move kvm pmu setup to virt_cpu_post_init
hw/arm/virt: Move post cpu realize check into its own function
target/arm/kvm: Make uncalled stubs explicitly unreachable
linux headers: sync to 5.9-rc7
hw/char/bcm2835_aux: Allow less than 32-bit accesses
hw/arm/sbsa-ref : allocate IRQs for SMMUv3
hw/arm/sbsa-ref : Fix SMMUv3 Initialisation
hw/arm/fsl-imx25: Fix a typo
hw/ssi/npcm7xx_fiu: Fix handling of unsigned integer
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qtest/arm-cpu-features.c | 25 | ||||
-rw-r--r-- | tests/qtest/meson.build | 3 |
2 files changed, 23 insertions, 5 deletions
diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 77b5e30a9c..d20094d5a7 100644 --- a/tests/qtest/arm-cpu-features.c +++ b/tests/qtest/arm-cpu-features.c @@ -452,6 +452,7 @@ static void test_query_cpu_model_expansion(const void *data) assert_set_feature(qts, "max", "pmu", true); assert_has_not_feature(qts, "max", "kvm-no-adjvtime"); + assert_has_not_feature(qts, "max", "kvm-steal-time"); if (g_str_equal(qtest_get_arch(), "aarch64")) { assert_has_feature_enabled(qts, "max", "aarch64"); @@ -493,6 +494,7 @@ static void test_query_cpu_model_expansion_kvm(const void *data) assert_set_feature(qts, "host", "kvm-no-adjvtime", false); if (g_str_equal(qtest_get_arch(), "aarch64")) { + bool kvm_supports_steal_time; bool kvm_supports_sve; char max_name[8], name[8]; uint32_t max_vq, vq; @@ -500,6 +502,10 @@ static void test_query_cpu_model_expansion_kvm(const void *data) QDict *resp; char *error; + assert_error(qts, "cortex-a15", + "We cannot guarantee the CPU type 'cortex-a15' works " + "with KVM on this host", NULL); + assert_has_feature_enabled(qts, "host", "aarch64"); /* Enabling and disabling pmu should always work. */ @@ -507,16 +513,26 @@ static void test_query_cpu_model_expansion_kvm(const void *data) assert_set_feature(qts, "host", "pmu", false); assert_set_feature(qts, "host", "pmu", true); - assert_error(qts, "cortex-a15", - "We cannot guarantee the CPU type 'cortex-a15' works " - "with KVM on this host", NULL); - + /* + * Some features would be enabled by default, but they're disabled + * because this instance of KVM doesn't support them. Test that the + * features are present, and, when enabled, issue further tests. + */ + assert_has_feature(qts, "host", "kvm-steal-time"); assert_has_feature(qts, "host", "sve"); + resp = do_query_no_props(qts, "host"); + kvm_supports_steal_time = resp_get_feature(resp, "kvm-steal-time"); kvm_supports_sve = resp_get_feature(resp, "sve"); vls = resp_get_sve_vls(resp); qobject_unref(resp); + if (kvm_supports_steal_time) { + /* If we have steal-time then we should be able to toggle it. */ + assert_set_feature(qts, "host", "kvm-steal-time", false); + assert_set_feature(qts, "host", "kvm-steal-time", true); + } + if (kvm_supports_sve) { g_assert(vls != 0); max_vq = 64 - __builtin_clzll(vls); @@ -577,6 +593,7 @@ static void test_query_cpu_model_expansion_kvm(const void *data) assert_has_not_feature(qts, "host", "aarch64"); assert_has_not_feature(qts, "host", "pmu"); assert_has_not_feature(qts, "host", "sve"); + assert_has_not_feature(qts, "host", "kvm-steal-time"); } qtest_quit(qts); diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build index ad33ac311d..0f32ca0895 100644 --- a/tests/qtest/meson.build +++ b/tests/qtest/meson.build @@ -146,7 +146,8 @@ qtests_aarch64 = \ (cpu != 'arm' ? ['bios-tables-test'] : []) + \ (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-test'] : []) + \ (config_all_devices.has_key('CONFIG_TPM_TIS_SYSBUS') ? ['tpm-tis-device-swtpm-test'] : []) + \ - ['numa-test', + ['arm-cpu-features', + 'numa-test', 'boot-serial-test', 'migration-test'] |