diff options
Diffstat (limited to 'drivers/kvm')
-rw-r--r-- | drivers/kvm/kvm_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 6e15aef6c34f..a8b425284bd7 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -230,6 +230,7 @@ static int kvm_dev_open(struct inode *inode, struct file *filp) | |||
230 | struct kvm_vcpu *vcpu = &kvm->vcpus[i]; | 230 | struct kvm_vcpu *vcpu = &kvm->vcpus[i]; |
231 | 231 | ||
232 | mutex_init(&vcpu->mutex); | 232 | mutex_init(&vcpu->mutex); |
233 | vcpu->kvm = kvm; | ||
233 | vcpu->mmu.root_hpa = INVALID_PAGE; | 234 | vcpu->mmu.root_hpa = INVALID_PAGE; |
234 | INIT_LIST_HEAD(&vcpu->free_pages); | 235 | INIT_LIST_HEAD(&vcpu->free_pages); |
235 | } | 236 | } |
@@ -530,7 +531,6 @@ static int kvm_dev_ioctl_create_vcpu(struct kvm *kvm, int n) | |||
530 | vcpu->guest_fx_image = vcpu->host_fx_image + FX_IMAGE_SIZE; | 531 | vcpu->guest_fx_image = vcpu->host_fx_image + FX_IMAGE_SIZE; |
531 | 532 | ||
532 | vcpu->cpu = -1; /* First load will set up TR */ | 533 | vcpu->cpu = -1; /* First load will set up TR */ |
533 | vcpu->kvm = kvm; | ||
534 | r = kvm_arch_ops->vcpu_create(vcpu); | 534 | r = kvm_arch_ops->vcpu_create(vcpu); |
535 | if (r < 0) | 535 | if (r < 0) |
536 | goto out_free_vcpus; | 536 | goto out_free_vcpus; |