diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f070f0a9adee..b364d192896c 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2433,11 +2433,11 @@ int kvm_emulate_halt(struct kvm_vcpu *vcpu) | |||
2433 | ++vcpu->stat.halt_exits; | 2433 | ++vcpu->stat.halt_exits; |
2434 | KVMTRACE_0D(HLT, vcpu, handler); | 2434 | KVMTRACE_0D(HLT, vcpu, handler); |
2435 | if (irqchip_in_kernel(vcpu->kvm)) { | 2435 | if (irqchip_in_kernel(vcpu->kvm)) { |
2436 | vcpu->arch.mp_state = VCPU_MP_STATE_HALTED; | 2436 | vcpu->arch.mp_state = KVM_MP_STATE_HALTED; |
2437 | up_read(&vcpu->kvm->slots_lock); | 2437 | up_read(&vcpu->kvm->slots_lock); |
2438 | kvm_vcpu_block(vcpu); | 2438 | kvm_vcpu_block(vcpu); |
2439 | down_read(&vcpu->kvm->slots_lock); | 2439 | down_read(&vcpu->kvm->slots_lock); |
2440 | if (vcpu->arch.mp_state != VCPU_MP_STATE_RUNNABLE) | 2440 | if (vcpu->arch.mp_state != KVM_MP_STATE_RUNNABLE) |
2441 | return -EINTR; | 2441 | return -EINTR; |
2442 | return 1; | 2442 | return 1; |
2443 | } else { | 2443 | } else { |
@@ -2726,14 +2726,14 @@ static int __vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
2726 | { | 2726 | { |
2727 | int r; | 2727 | int r; |
2728 | 2728 | ||
2729 | if (unlikely(vcpu->arch.mp_state == VCPU_MP_STATE_SIPI_RECEIVED)) { | 2729 | if (unlikely(vcpu->arch.mp_state == KVM_MP_STATE_SIPI_RECEIVED)) { |
2730 | pr_debug("vcpu %d received sipi with vector # %x\n", | 2730 | pr_debug("vcpu %d received sipi with vector # %x\n", |
2731 | vcpu->vcpu_id, vcpu->arch.sipi_vector); | 2731 | vcpu->vcpu_id, vcpu->arch.sipi_vector); |
2732 | kvm_lapic_reset(vcpu); | 2732 | kvm_lapic_reset(vcpu); |
2733 | r = kvm_x86_ops->vcpu_reset(vcpu); | 2733 | r = kvm_x86_ops->vcpu_reset(vcpu); |
2734 | if (r) | 2734 | if (r) |
2735 | return r; | 2735 | return r; |
2736 | vcpu->arch.mp_state = VCPU_MP_STATE_RUNNABLE; | 2736 | vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; |
2737 | } | 2737 | } |
2738 | 2738 | ||
2739 | down_read(&vcpu->kvm->slots_lock); | 2739 | down_read(&vcpu->kvm->slots_lock); |
@@ -2891,7 +2891,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) | |||
2891 | 2891 | ||
2892 | vcpu_load(vcpu); | 2892 | vcpu_load(vcpu); |
2893 | 2893 | ||
2894 | if (unlikely(vcpu->arch.mp_state == VCPU_MP_STATE_UNINITIALIZED)) { | 2894 | if (unlikely(vcpu->arch.mp_state == KVM_MP_STATE_UNINITIALIZED)) { |
2895 | kvm_vcpu_block(vcpu); | 2895 | kvm_vcpu_block(vcpu); |
2896 | vcpu_put(vcpu); | 2896 | vcpu_put(vcpu); |
2897 | return -EAGAIN; | 2897 | return -EAGAIN; |
@@ -3794,9 +3794,9 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu) | |||
3794 | 3794 | ||
3795 | vcpu->arch.mmu.root_hpa = INVALID_PAGE; | 3795 | vcpu->arch.mmu.root_hpa = INVALID_PAGE; |
3796 | if (!irqchip_in_kernel(kvm) || vcpu->vcpu_id == 0) | 3796 | if (!irqchip_in_kernel(kvm) || vcpu->vcpu_id == 0) |
3797 | vcpu->arch.mp_state = VCPU_MP_STATE_RUNNABLE; | 3797 | vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; |
3798 | else | 3798 | else |
3799 | vcpu->arch.mp_state = VCPU_MP_STATE_UNINITIALIZED; | 3799 | vcpu->arch.mp_state = KVM_MP_STATE_UNINITIALIZED; |
3800 | 3800 | ||
3801 | page = alloc_page(GFP_KERNEL | __GFP_ZERO); | 3801 | page = alloc_page(GFP_KERNEL | __GFP_ZERO); |
3802 | if (!page) { | 3802 | if (!page) { |
@@ -3936,8 +3936,8 @@ int kvm_arch_set_memory_region(struct kvm *kvm, | |||
3936 | 3936 | ||
3937 | int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) | 3937 | int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) |
3938 | { | 3938 | { |
3939 | return vcpu->arch.mp_state == VCPU_MP_STATE_RUNNABLE | 3939 | return vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE |
3940 | || vcpu->arch.mp_state == VCPU_MP_STATE_SIPI_RECEIVED; | 3940 | || vcpu->arch.mp_state == KVM_MP_STATE_SIPI_RECEIVED; |
3941 | } | 3941 | } |
3942 | 3942 | ||
3943 | static void vcpu_kick_intr(void *info) | 3943 | static void vcpu_kick_intr(void *info) |