diff options
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 0b23657f434c..a6e3165043d1 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -2122,7 +2122,9 @@ static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
2122 | pr_debug("vcpu %d received sipi with vector # %x\n", | 2122 | pr_debug("vcpu %d received sipi with vector # %x\n", |
2123 | vcpu->vcpu_id, vcpu->sipi_vector); | 2123 | vcpu->vcpu_id, vcpu->sipi_vector); |
2124 | kvm_lapic_reset(vcpu); | 2124 | kvm_lapic_reset(vcpu); |
2125 | kvm_x86_ops->vcpu_reset(vcpu); | 2125 | r = kvm_x86_ops->vcpu_reset(vcpu); |
2126 | if (r) | ||
2127 | return r; | ||
2126 | vcpu->mp_state = VCPU_MP_STATE_RUNNABLE; | 2128 | vcpu->mp_state = VCPU_MP_STATE_RUNNABLE; |
2127 | } | 2129 | } |
2128 | 2130 | ||
@@ -2637,7 +2639,9 @@ static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, int n) | |||
2637 | BUG_ON((unsigned long)&vcpu->host_fx_image & 0xF); | 2639 | BUG_ON((unsigned long)&vcpu->host_fx_image & 0xF); |
2638 | 2640 | ||
2639 | vcpu_load(vcpu); | 2641 | vcpu_load(vcpu); |
2640 | r = kvm_mmu_setup(vcpu); | 2642 | r = kvm_x86_ops->vcpu_reset(vcpu); |
2643 | if (r == 0) | ||
2644 | r = kvm_mmu_setup(vcpu); | ||
2641 | vcpu_put(vcpu); | 2645 | vcpu_put(vcpu); |
2642 | if (r < 0) | 2646 | if (r < 0) |
2643 | goto free_vcpu; | 2647 | goto free_vcpu; |