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)
12001200 if (!kvm_arm_support_pmu_v3 ())
12011201 clear_bit (KVM_ARM_VCPU_PMU_V3 , & features );
12021202
1203+ if (!system_supports_sve ())
1204+ clear_bit (KVM_ARM_VCPU_SVE , & features );
1205+
12031206 return features ;
12041207}
12051208
Original file line number Diff line number Diff line change @@ -73,11 +73,8 @@ int __init kvm_arm_init_sve(void)
7373 return 0 ;
7474}
7575
76- static int kvm_vcpu_enable_sve (struct kvm_vcpu * vcpu )
76+ static void kvm_vcpu_enable_sve (struct kvm_vcpu * vcpu )
7777{
78- if (!system_supports_sve ())
79- return - EINVAL ;
80-
8178 vcpu -> arch .sve_max_vl = kvm_sve_max_vl ;
8279
8380 /*
@@ -86,8 +83,6 @@ static int kvm_vcpu_enable_sve(struct kvm_vcpu *vcpu)
8683 * kvm_arm_vcpu_finalize(), which freezes the configuration.
8784 */
8885 vcpu_set_flag (vcpu , GUEST_HAS_SVE );
89-
90- return 0 ;
9186}
9287
9388/*
@@ -231,11 +226,8 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
231226 }
232227
233228 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 );
239231 } else {
240232 kvm_vcpu_reset_sve (vcpu );
241233 }
You can’t perform that action at this time.
0 commit comments