diff options
-rw-r--r-- | arch/x86/kvm/x86.c | 8 | ||||
-rw-r--r-- | include/linux/kvm_host.h | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 1eefebe5d727..dfed7ca2d27a 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -160,6 +160,8 @@ u64 __read_mostly host_xcr0; | |||
160 | 160 | ||
161 | int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt); | 161 | int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt); |
162 | 162 | ||
163 | static int kvm_vcpu_reset(struct kvm_vcpu *vcpu); | ||
164 | |||
163 | static inline void kvm_async_pf_hash_reset(struct kvm_vcpu *vcpu) | 165 | static inline void kvm_async_pf_hash_reset(struct kvm_vcpu *vcpu) |
164 | { | 166 | { |
165 | int i; | 167 | int i; |
@@ -5426,7 +5428,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu) | |||
5426 | pr_debug("vcpu %d received sipi with vector # %x\n", | 5428 | pr_debug("vcpu %d received sipi with vector # %x\n", |
5427 | vcpu->vcpu_id, vcpu->arch.sipi_vector); | 5429 | vcpu->vcpu_id, vcpu->arch.sipi_vector); |
5428 | kvm_lapic_reset(vcpu); | 5430 | kvm_lapic_reset(vcpu); |
5429 | r = kvm_arch_vcpu_reset(vcpu); | 5431 | r = kvm_vcpu_reset(vcpu); |
5430 | if (r) | 5432 | if (r) |
5431 | return r; | 5433 | return r; |
5432 | vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; | 5434 | vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; |
@@ -6036,7 +6038,7 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu) | |||
6036 | r = vcpu_load(vcpu); | 6038 | r = vcpu_load(vcpu); |
6037 | if (r) | 6039 | if (r) |
6038 | return r; | 6040 | return r; |
6039 | r = kvm_arch_vcpu_reset(vcpu); | 6041 | r = kvm_vcpu_reset(vcpu); |
6040 | if (r == 0) | 6042 | if (r == 0) |
6041 | r = kvm_mmu_setup(vcpu); | 6043 | r = kvm_mmu_setup(vcpu); |
6042 | vcpu_put(vcpu); | 6044 | vcpu_put(vcpu); |
@@ -6058,7 +6060,7 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) | |||
6058 | kvm_x86_ops->vcpu_free(vcpu); | 6060 | kvm_x86_ops->vcpu_free(vcpu); |
6059 | } | 6061 | } |
6060 | 6062 | ||
6061 | int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu) | 6063 | static int kvm_vcpu_reset(struct kvm_vcpu *vcpu) |
6062 | { | 6064 | { |
6063 | atomic_set(&vcpu->arch.nmi_queued, 0); | 6065 | atomic_set(&vcpu->arch.nmi_queued, 0); |
6064 | vcpu->arch.nmi_pending = 0; | 6066 | vcpu->arch.nmi_pending = 0; |
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 93bfc9f9815c..c35b1c08c004 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -582,7 +582,6 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id); | |||
582 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu); | 582 | int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu); |
583 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); | 583 | void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu); |
584 | 584 | ||
585 | int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu); | ||
586 | int kvm_arch_hardware_enable(void *garbage); | 585 | int kvm_arch_hardware_enable(void *garbage); |
587 | void kvm_arch_hardware_disable(void *garbage); | 586 | void kvm_arch_hardware_disable(void *garbage); |
588 | int kvm_arch_hardware_setup(void); | 587 | int kvm_arch_hardware_setup(void); |