File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -1200,6 +1200,9 @@ static unsigned long system_supported_vcpu_features(void)
1200
1200
if (!kvm_arm_support_pmu_v3 ())
1201
1201
clear_bit (KVM_ARM_VCPU_PMU_V3 , & features );
1202
1202
1203
+ if (!system_supports_sve ())
1204
+ clear_bit (KVM_ARM_VCPU_SVE , & features );
1205
+
1203
1206
return features ;
1204
1207
}
1205
1208
Original file line number Diff line number Diff line change @@ -73,11 +73,8 @@ int __init kvm_arm_init_sve(void)
73
73
return 0 ;
74
74
}
75
75
76
- static int kvm_vcpu_enable_sve (struct kvm_vcpu * vcpu )
76
+ static void kvm_vcpu_enable_sve (struct kvm_vcpu * vcpu )
77
77
{
78
- if (!system_supports_sve ())
79
- return - EINVAL ;
80
-
81
78
vcpu -> arch .sve_max_vl = kvm_sve_max_vl ;
82
79
83
80
/*
@@ -86,8 +83,6 @@ static int kvm_vcpu_enable_sve(struct kvm_vcpu *vcpu)
86
83
* kvm_arm_vcpu_finalize(), which freezes the configuration.
87
84
*/
88
85
vcpu_set_flag (vcpu , GUEST_HAS_SVE );
89
-
90
- return 0 ;
91
86
}
92
87
93
88
/*
@@ -231,11 +226,8 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
231
226
}
232
227
233
228
if (!kvm_arm_vcpu_sve_finalized (vcpu )) {
234
- if (test_bit (KVM_ARM_VCPU_SVE , vcpu -> arch .features )) {
235
- ret = kvm_vcpu_enable_sve (vcpu );
236
- if (ret )
237
- goto out ;
238
- }
229
+ if (test_bit (KVM_ARM_VCPU_SVE , vcpu -> arch .features ))
230
+ kvm_vcpu_enable_sve (vcpu );
239
231
} else {
240
232
kvm_vcpu_reset_sve (vcpu );
241
233
}
You can’t perform that action at this time.
0 commit comments