File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -368,7 +368,7 @@ static void kvm_vgic_dist_destroy(struct kvm *kvm)
368
368
vgic_v4_teardown (kvm );
369
369
}
370
370
371
- void kvm_vgic_vcpu_destroy (struct kvm_vcpu * vcpu )
371
+ static void __kvm_vgic_vcpu_destroy (struct kvm_vcpu * vcpu )
372
372
{
373
373
struct vgic_cpu * vgic_cpu = & vcpu -> arch .vgic_cpu ;
374
374
@@ -382,6 +382,15 @@ void kvm_vgic_vcpu_destroy(struct kvm_vcpu *vcpu)
382
382
vgic_cpu -> rd_iodev .base_addr = VGIC_ADDR_UNDEF ;
383
383
}
384
384
385
+ void kvm_vgic_vcpu_destroy (struct kvm_vcpu * vcpu )
386
+ {
387
+ struct kvm * kvm = vcpu -> kvm ;
388
+
389
+ mutex_lock (& kvm -> slots_lock );
390
+ __kvm_vgic_vcpu_destroy (vcpu );
391
+ mutex_unlock (& kvm -> slots_lock );
392
+ }
393
+
385
394
void kvm_vgic_destroy (struct kvm * kvm )
386
395
{
387
396
struct kvm_vcpu * vcpu ;
@@ -392,7 +401,7 @@ void kvm_vgic_destroy(struct kvm *kvm)
392
401
vgic_debug_destroy (kvm );
393
402
394
403
kvm_for_each_vcpu (i , vcpu , kvm )
395
- kvm_vgic_vcpu_destroy (vcpu );
404
+ __kvm_vgic_vcpu_destroy (vcpu );
396
405
397
406
mutex_lock (& kvm -> arch .config_lock );
398
407
You can’t perform that action at this time.
0 commit comments