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>
This commit is contained in:
committed by
Avi Kivity
parent
a2fa3e9f52
commit
fb3f0f51d9
@@ -23,7 +23,7 @@ static const u32 host_save_user_msrs[] = {
|
||||
struct kvm_vcpu;
|
||||
|
||||
struct vcpu_svm {
|
||||
struct kvm_vcpu *vcpu;
|
||||
struct kvm_vcpu vcpu;
|
||||
struct vmcb *vmcb;
|
||||
unsigned long vmcb_pa;
|
||||
struct svm_cpu_data *svm_data;
|
||||
|
Reference in New Issue
Block a user