On 5/12/19 1:36 AM, Andrew Jones wrote: > @@ -292,7 +292,7 @@ static void aarch64_max_initfn(Object *obj) > > if (kvm_enabled()) { > kvm_arm_set_cpu_features_from_host(cpu); > - cpu->sve_max_vq = ARM_MAX_VQ; > + cpu->sve_max_vq = -1; /* set in kvm_arch_init_vcpu() */
Perhaps a better comment is "unspecified, to be finalized in ..." > + object_property_add(obj, "sve-max-vq", "uint32", cpu_max_get_sve_vq, > + cpu_max_set_sve_vq, NULL, NULL, &error_fatal); as one can set it here, via the command-line. > @@ -644,6 +702,24 @@ int kvm_arch_init_vcpu(CPUState *cs) > } > > if (cpu->sve_max_vq) { > + uint64_t sve_vls[KVM_ARM64_SVE_VLS_WORDS]; > + ret = kvm_arm_get_sve_vls(cs, sve_vls); > + if (ret < 0) { > + return ret; > + } > + if (cpu->sve_max_vq == -1) { > + cpu->sve_max_vq = ret; You still cannot set a value larger than ARM_MAX_VQ, as that is the fixed amount of space allocated within the cpu structure. r~