File tree Expand file tree Collapse file tree 5 files changed +9
-15
lines changed
Expand file tree Collapse file tree 5 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ extern unsigned int __ro_after_init kvm_sve_max_vl;
7878int __init kvm_arm_init_sve (void );
7979
8080u32 __attribute_const__ kvm_target_cpu (void );
81- int kvm_reset_vcpu (struct kvm_vcpu * vcpu );
81+ void kvm_reset_vcpu (struct kvm_vcpu * vcpu );
8282void kvm_arm_vcpu_destroy (struct kvm_vcpu * vcpu );
8383
8484struct kvm_hyp_memcache {
Original file line number Diff line number Diff line change @@ -943,7 +943,7 @@ void kvm_timer_sync_user(struct kvm_vcpu *vcpu)
943943 unmask_vtimer_irq_user (vcpu );
944944}
945945
946- int kvm_timer_vcpu_reset (struct kvm_vcpu * vcpu )
946+ void kvm_timer_vcpu_reset (struct kvm_vcpu * vcpu )
947947{
948948 struct arch_timer_cpu * timer = vcpu_timer (vcpu );
949949 struct timer_map map ;
@@ -987,8 +987,6 @@ int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu)
987987 soft_timer_cancel (& map .emul_vtimer -> hrtimer );
988988 if (map .emul_ptimer )
989989 soft_timer_cancel (& map .emul_ptimer -> hrtimer );
990-
991- return 0 ;
992990}
993991
994992static void timer_context_init (struct kvm_vcpu * vcpu , int timerid )
Original file line number Diff line number Diff line change @@ -1282,15 +1282,12 @@ static int __kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
12821282 bitmap_copy (vcpu -> arch .features , & features , KVM_VCPU_MAX_FEATURES );
12831283
12841284 /* Now we know what it is, we can reset it. */
1285- ret = kvm_reset_vcpu (vcpu );
1286- if (ret ) {
1287- bitmap_zero (vcpu -> arch .features , KVM_VCPU_MAX_FEATURES );
1288- goto out_unlock ;
1289- }
1285+ kvm_reset_vcpu (vcpu );
12901286
12911287 bitmap_copy (kvm -> arch .vcpu_features , & features , KVM_VCPU_MAX_FEATURES );
12921288 set_bit (KVM_ARCH_FLAG_VCPU_FEATURES_CONFIGURED , & kvm -> arch .flags );
12931289 vcpu_set_flag (vcpu , VCPU_INITIALIZED );
1290+ ret = 0 ;
12941291out_unlock :
12951292 mutex_unlock (& kvm -> arch .config_lock );
12961293 return ret ;
@@ -1315,7 +1312,8 @@ static int kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
13151312 if (kvm_vcpu_init_changed (vcpu , init ))
13161313 return - EINVAL ;
13171314
1318- return kvm_reset_vcpu (vcpu );
1315+ kvm_reset_vcpu (vcpu );
1316+ return 0 ;
13191317}
13201318
13211319static int kvm_arch_vcpu_ioctl_vcpu_init (struct kvm_vcpu * vcpu ,
Original file line number Diff line number Diff line change @@ -188,10 +188,9 @@ static void kvm_vcpu_enable_ptrauth(struct kvm_vcpu *vcpu)
188188 * disable preemption around the vcpu reset as we would otherwise race with
189189 * preempt notifiers which also call put/load.
190190 */
191- int kvm_reset_vcpu (struct kvm_vcpu * vcpu )
191+ void kvm_reset_vcpu (struct kvm_vcpu * vcpu )
192192{
193193 struct vcpu_reset_state reset_state ;
194- int ret ;
195194 bool loaded ;
196195 u32 pstate ;
197196
@@ -260,12 +259,11 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
260259 }
261260
262261 /* Reset timer */
263- ret = kvm_timer_vcpu_reset (vcpu );
262+ kvm_timer_vcpu_reset (vcpu );
264263
265264 if (loaded )
266265 kvm_arch_vcpu_load (vcpu , smp_processor_id ());
267266 preempt_enable ();
268- return ret ;
269267}
270268
271269u32 get_kvm_ipa_limit (void )
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ struct arch_timer_cpu {
9494
9595int __init kvm_timer_hyp_init (bool has_gic );
9696int kvm_timer_enable (struct kvm_vcpu * vcpu );
97- int kvm_timer_vcpu_reset (struct kvm_vcpu * vcpu );
97+ void kvm_timer_vcpu_reset (struct kvm_vcpu * vcpu );
9898void kvm_timer_vcpu_init (struct kvm_vcpu * vcpu );
9999void kvm_timer_sync_user (struct kvm_vcpu * vcpu );
100100bool kvm_timer_should_notify_user (struct kvm_vcpu * vcpu );
You can’t perform that action at this time.
0 commit comments