@@ -99,7 +99,7 @@ QEMU_BUILD_BUG_ON(ARM_MAX_VQ > 16);
* then the order that considers those dependencies must be used.
*/
static const char *cpu_model_advertised_features[] = {
- "aarch64", "pmu", "sve",
+ "aarch64", "pmu", "spe", "sve",
"sve128", "sve256", "sve384", "sve512",
"sve640", "sve768", "sve896", "sve1024", "sve1152", "sve1280",
"sve1408", "sve1536", "sve1664", "sve1792", "sve1920", "sve2048",
@@ -494,6 +494,7 @@ static void test_query_cpu_model_expansion_kvm(const void *data)
if (g_str_equal(qtest_get_arch(), "aarch64")) {
bool kvm_supports_sve;
+ bool kvm_supports_spe;
char max_name[8], name[8];
uint32_t max_vq, vq;
uint64_t vls;
@@ -512,8 +513,10 @@ static void test_query_cpu_model_expansion_kvm(const void *data)
"with KVM on this host", NULL);
assert_has_feature(qts, "host", "sve");
+ assert_has_feature(qts, "host", "spe");
resp = do_query_no_props(qts, "host");
kvm_supports_sve = resp_get_feature(resp, "sve");
+ kvm_supports_spe = resp_get_feature(resp, "spe");
vls = resp_get_sve_vls(resp);
qobject_unref(resp);
@@ -573,10 +576,16 @@ static void test_query_cpu_model_expansion_kvm(const void *data)
} else {
g_assert(vls == 0);
}
+
+ if (kvm_supports_spe) {
+ assert_set_feature(qts, "host", "spe", false);
+ assert_set_feature(qts, "host", "spe", true);
+ }
} else {
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", "spe");
}
qtest_quit(qts);