aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/svm.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-11-07 05:57:23 -0500
committerAvi Kivity <avi@qumranet.com>2007-11-08 05:05:36 -0500
commit70433389ccfe2719ef5cd539d04172260294f0f5 (patch)
tree3e09b11482284749b85f3c360533df7b9b86a0a5 /drivers/kvm/svm.c
parent1e35d3c4a7a9682256c887a1388cf3faefdf53df (diff)
KVM: SVM: Fix SMP with kernel apic
AP processor needs to reset to the SIPI vector, not normal INIT. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/svm.c')
-rw-r--r--drivers/kvm/svm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c
index 729f1cd93606..3910358db79d 100644
--- a/drivers/kvm/svm.c
+++ b/drivers/kvm/svm.c
@@ -561,6 +561,12 @@ static void svm_vcpu_reset(struct kvm_vcpu *vcpu)
561 struct vcpu_svm *svm = to_svm(vcpu); 561 struct vcpu_svm *svm = to_svm(vcpu);
562 562
563 init_vmcb(svm->vmcb); 563 init_vmcb(svm->vmcb);
564
565 if (vcpu->vcpu_id != 0) {
566 svm->vmcb->save.rip = 0;
567 svm->vmcb->save.cs.base = svm->vcpu.sipi_vector << 12;
568 svm->vmcb->save.cs.selector = svm->vcpu.sipi_vector << 8;
569 }
564} 570}
565 571
566static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) 572static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id)