KVM: Dynamically allocate vcpus
This patch converts the vcpus array in "struct kvm" to a pointer array, and changes the "vcpu_create" and "vcpu_setup" hooks into one "vcpu_create" call which does the allocation and initialization of the vcpu (calling back into the kvm_vcpu_init core helper). Signed-off-by:Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
Avi Kivity <avi@qumranet.com>
Showing
- drivers/kvm/kvm.h 6 additions, 6 deletionsdrivers/kvm/kvm.h
- drivers/kvm/kvm_main.c 103 additions, 95 deletionsdrivers/kvm/kvm_main.c
- drivers/kvm/kvm_svm.h 1 addition, 1 deletiondrivers/kvm/kvm_svm.h
- drivers/kvm/svm.c 86 additions, 91 deletionsdrivers/kvm/svm.c
- drivers/kvm/vmx.c 40 additions, 25 deletionsdrivers/kvm/vmx.c
Loading
Please register or sign in to comment