Loading drivers/kvm/kvm.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -379,6 +379,7 @@ struct kvm { struct list_head active_mmu_pages; struct list_head active_mmu_pages; int n_free_mmu_pages; int n_free_mmu_pages; struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES]; struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES]; int nvcpus; struct kvm_vcpu vcpus[KVM_MAX_VCPUS]; struct kvm_vcpu vcpus[KVM_MAX_VCPUS]; int memory_config_version; int memory_config_version; int busy; int busy; Loading drivers/kvm/kvm_main.c +5 −0 Original line number Original line Diff line number Diff line Loading @@ -2391,6 +2391,11 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n) if (r < 0) if (r < 0) goto out_free_vcpus; goto out_free_vcpus; spin_lock(&kvm_lock); if (n >= kvm->nvcpus) kvm->nvcpus = n + 1; spin_unlock(&kvm_lock); return r; return r; out_free_vcpus: out_free_vcpus: Loading Loading
drivers/kvm/kvm.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -379,6 +379,7 @@ struct kvm { struct list_head active_mmu_pages; struct list_head active_mmu_pages; int n_free_mmu_pages; int n_free_mmu_pages; struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES]; struct hlist_head mmu_page_hash[KVM_NUM_MMU_PAGES]; int nvcpus; struct kvm_vcpu vcpus[KVM_MAX_VCPUS]; struct kvm_vcpu vcpus[KVM_MAX_VCPUS]; int memory_config_version; int memory_config_version; int busy; int busy; Loading
drivers/kvm/kvm_main.c +5 −0 Original line number Original line Diff line number Diff line Loading @@ -2391,6 +2391,11 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n) if (r < 0) if (r < 0) goto out_free_vcpus; goto out_free_vcpus; spin_lock(&kvm_lock); if (n >= kvm->nvcpus) kvm->nvcpus = n + 1; spin_unlock(&kvm_lock); return r; return r; out_free_vcpus: out_free_vcpus: Loading