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;
78
78
int __init kvm_arm_init_sve (void );
79
79
80
80
u32 __attribute_const__ kvm_target_cpu (void );
81
- int kvm_reset_vcpu (struct kvm_vcpu * vcpu );
81
+ void kvm_reset_vcpu (struct kvm_vcpu * vcpu );
82
82
void kvm_arm_vcpu_destroy (struct kvm_vcpu * vcpu );
83
83
84
84
struct 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)
943
943
unmask_vtimer_irq_user (vcpu );
944
944
}
945
945
946
- int kvm_timer_vcpu_reset (struct kvm_vcpu * vcpu )
946
+ void kvm_timer_vcpu_reset (struct kvm_vcpu * vcpu )
947
947
{
948
948
struct arch_timer_cpu * timer = vcpu_timer (vcpu );
949
949
struct timer_map map ;
@@ -987,8 +987,6 @@ int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu)
987
987
soft_timer_cancel (& map .emul_vtimer -> hrtimer );
988
988
if (map .emul_ptimer )
989
989
soft_timer_cancel (& map .emul_ptimer -> hrtimer );
990
-
991
- return 0 ;
992
990
}
993
991
994
992
static 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,
1282
1282
bitmap_copy (vcpu -> arch .features , & features , KVM_VCPU_MAX_FEATURES );
1283
1283
1284
1284
/* 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 );
1290
1286
1291
1287
bitmap_copy (kvm -> arch .vcpu_features , & features , KVM_VCPU_MAX_FEATURES );
1292
1288
set_bit (KVM_ARCH_FLAG_VCPU_FEATURES_CONFIGURED , & kvm -> arch .flags );
1293
1289
vcpu_set_flag (vcpu , VCPU_INITIALIZED );
1290
+ ret = 0 ;
1294
1291
out_unlock :
1295
1292
mutex_unlock (& kvm -> arch .config_lock );
1296
1293
return ret ;
@@ -1315,7 +1312,8 @@ static int kvm_vcpu_set_target(struct kvm_vcpu *vcpu,
1315
1312
if (kvm_vcpu_init_changed (vcpu , init ))
1316
1313
return - EINVAL ;
1317
1314
1318
- return kvm_reset_vcpu (vcpu );
1315
+ kvm_reset_vcpu (vcpu );
1316
+ return 0 ;
1319
1317
}
1320
1318
1321
1319
static 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)
188
188
* disable preemption around the vcpu reset as we would otherwise race with
189
189
* preempt notifiers which also call put/load.
190
190
*/
191
- int kvm_reset_vcpu (struct kvm_vcpu * vcpu )
191
+ void kvm_reset_vcpu (struct kvm_vcpu * vcpu )
192
192
{
193
193
struct vcpu_reset_state reset_state ;
194
- int ret ;
195
194
bool loaded ;
196
195
u32 pstate ;
197
196
@@ -260,12 +259,11 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)
260
259
}
261
260
262
261
/* Reset timer */
263
- ret = kvm_timer_vcpu_reset (vcpu );
262
+ kvm_timer_vcpu_reset (vcpu );
264
263
265
264
if (loaded )
266
265
kvm_arch_vcpu_load (vcpu , smp_processor_id ());
267
266
preempt_enable ();
268
- return ret ;
269
267
}
270
268
271
269
u32 get_kvm_ipa_limit (void )
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ struct arch_timer_cpu {
94
94
95
95
int __init kvm_timer_hyp_init (bool has_gic );
96
96
int 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 );
98
98
void kvm_timer_vcpu_init (struct kvm_vcpu * vcpu );
99
99
void kvm_timer_sync_user (struct kvm_vcpu * vcpu );
100
100
bool kvm_timer_should_notify_user (struct kvm_vcpu * vcpu );
You can’t perform that action at this time.
0 commit comments