aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2013-03-12 05:20:24 -0400
committerGleb Natapov <gleb@redhat.com>2013-03-12 07:25:56 -0400
commit57f252f22908535e04d520f3833a6e3116eb159d (patch)
tree144fe55ee05d9334c3bea99581763630914ea463 /arch/x86/kvm/x86.c
parent03ba32cae66e3798d697e582633af2c7dd6907e5 (diff)
KVM: x86: Drop unused return code from VCPU reset callback
Neither vmx nor svm nor the common part may generate an error on kvm_vcpu_reset. So drop the return code. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index b67985af1753..fadd5a750476 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -162,7 +162,7 @@ u64 __read_mostly host_xcr0;
162 162
163static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt); 163static int emulator_fix_hypercall(struct x86_emulate_ctxt *ctxt);
164 164
165static int kvm_vcpu_reset(struct kvm_vcpu *vcpu); 165static void kvm_vcpu_reset(struct kvm_vcpu *vcpu);
166 166
167static inline void kvm_async_pf_hash_reset(struct kvm_vcpu *vcpu) 167static inline void kvm_async_pf_hash_reset(struct kvm_vcpu *vcpu)
168{ 168{
@@ -5858,9 +5858,7 @@ static int __vcpu_run(struct kvm_vcpu *vcpu)
5858 pr_debug("vcpu %d received sipi with vector # %x\n", 5858 pr_debug("vcpu %d received sipi with vector # %x\n",
5859 vcpu->vcpu_id, vcpu->arch.sipi_vector); 5859 vcpu->vcpu_id, vcpu->arch.sipi_vector);
5860 kvm_lapic_reset(vcpu); 5860 kvm_lapic_reset(vcpu);
5861 r = kvm_vcpu_reset(vcpu); 5861 kvm_vcpu_reset(vcpu);
5862 if (r)
5863 return r;
5864 vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; 5862 vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE;
5865 } 5863 }
5866 5864
@@ -6486,9 +6484,8 @@ int kvm_arch_vcpu_setup(struct kvm_vcpu *vcpu)
6486 r = vcpu_load(vcpu); 6484 r = vcpu_load(vcpu);
6487 if (r) 6485 if (r)
6488 return r; 6486 return r;
6489 r = kvm_vcpu_reset(vcpu); 6487 kvm_vcpu_reset(vcpu);
6490 if (r == 0) 6488 r = kvm_mmu_setup(vcpu);
6491 r = kvm_mmu_setup(vcpu);
6492 vcpu_put(vcpu); 6489 vcpu_put(vcpu);
6493 6490
6494 return r; 6491 return r;
@@ -6525,7 +6522,7 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)
6525 kvm_x86_ops->vcpu_free(vcpu); 6522 kvm_x86_ops->vcpu_free(vcpu);
6526} 6523}
6527 6524
6528static int kvm_vcpu_reset(struct kvm_vcpu *vcpu) 6525static void kvm_vcpu_reset(struct kvm_vcpu *vcpu)
6529{ 6526{
6530 atomic_set(&vcpu->arch.nmi_queued, 0); 6527 atomic_set(&vcpu->arch.nmi_queued, 0);
6531 vcpu->arch.nmi_pending = 0; 6528 vcpu->arch.nmi_pending = 0;
@@ -6552,7 +6549,7 @@ static int kvm_vcpu_reset(struct kvm_vcpu *vcpu)
6552 vcpu->arch.regs_avail = ~0; 6549 vcpu->arch.regs_avail = ~0;
6553 vcpu->arch.regs_dirty = ~0; 6550 vcpu->arch.regs_dirty = ~0;
6554 6551
6555 return kvm_x86_ops->vcpu_reset(vcpu); 6552 kvm_x86_ops->vcpu_reset(vcpu);
6556} 6553}
6557 6554
6558int kvm_arch_hardware_enable(void *garbage) 6555int kvm_arch_hardware_enable(void *garbage)