From: Lorenzo Pieralisi <[email protected]> Starting with kernel 7.4, hosts initialing a confidential VM are required to support the KVM_CAP_ARM_PSCI_0_2 extension.
Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> --- target/arm/kvm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/target/arm/kvm.c b/target/arm/kvm.c index dc1004785cb0..80296e0a867c 100644 --- a/target/arm/kvm.c +++ b/target/arm/kvm.c @@ -390,6 +390,14 @@ static void kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf, Error **errp features |= 1ULL << ARM_FEATURE_PMU; } + if (kvm_check_extension(kvm_state, KVM_CAP_ARM_PSCI_0_2)) { + /* + * Versions >= v0.2 are backward compatible with v0.2 + * omit the feature flag for v0.1 . + */ + init.features[0] |= 1 << KVM_ARM_VCPU_PSCI_0_2; + } + if (!kvm_arm_create_scratch_host_vcpu(fdarray, &init, errp)) { return; } -- 2.53.0
