On Tue, 11 Nov 2025, Eric Auger wrote:
On 10/30/25 5:59 PM, Sebastian Ott wrote:
Provide a kvm specific vcpu property to override the default
(as of kernel v6.13 that would be PSCI v1.3) PSCI version emulated
by kvm. Current valid values are: 0.1, 0.2, 1.0, 1.1, 1.2, and 1.3
Signed-off-by: Sebastian Ott <[email protected]>
---
[...]
+static char *kvm_get_psci_version(Object *obj, Error **errp)
+{
+ ARMCPU *cpu = ARM_CPU(obj);
+ const struct psci_version *ver;
+
+ for (ver = psci_versions; ver->number != -1; ver++) {
+ if (ver->number == cpu->prop_psci_version)
I still have the same question/comment as on v1. In case the end user
does not override the psci version I think you want to return the
default value, retrieved from KVM through KVM_REG_ARM_PSCI_VERSION and
which populates cpu->psci_version. So to me you should use
cpu->psci_version instead
Sry, I didn't get your question the first time and double checked that the
VM uses the default/most recent version when the property is not set.
I just found out how to actually call this function (via qom-get) and
you're right: the VM uses the correct version but we report something
different here - and in this version even trigger the assertion. Ouch.
[...]
@@ -1959,7 +2008,8 @@ int kvm_arch_init_vcpu(CPUState *cs)
if (cs->start_powered_off) {
cpu->kvm_init_features[0] |= 1 << KVM_ARM_VCPU_POWER_OFF;
}
- if (kvm_check_extension(cs->kvm_state, KVM_CAP_ARM_PSCI_0_2)) {
+ if (cpu->prop_psci_version != QEMU_PSCI_VERSION_0_1 &&
I don't understand what this change stands for. Please document it
through both a comment and a commit msg explanation
The explanation is in the cover letter - I'll move it to this patch.
Thanks,
Sebastian