diff options
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 8361662e7e0a..f1e2e8c373c6 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -2274,10 +2274,12 @@ static long kvm_vm_ioctl(struct file *filp, | |||
2274 | #ifdef CONFIG_KVM_APIC_ARCHITECTURE | 2274 | #ifdef CONFIG_KVM_APIC_ARCHITECTURE |
2275 | case KVM_SET_BOOT_CPU_ID: | 2275 | case KVM_SET_BOOT_CPU_ID: |
2276 | r = 0; | 2276 | r = 0; |
2277 | mutex_lock(&kvm->lock); | ||
2277 | if (atomic_read(&kvm->online_vcpus) != 0) | 2278 | if (atomic_read(&kvm->online_vcpus) != 0) |
2278 | r = -EBUSY; | 2279 | r = -EBUSY; |
2279 | else | 2280 | else |
2280 | kvm->bsp_vcpu_id = arg; | 2281 | kvm->bsp_vcpu_id = arg; |
2282 | mutex_unlock(&kvm->lock); | ||
2281 | break; | 2283 | break; |
2282 | #endif | 2284 | #endif |
2283 | default: | 2285 | default: |