From: Avi Kivity Date: Wed, 7 Nov 2007 10:57:23 +0000 (+0200) Subject: KVM: SVM: Fix SMP with kernel apic X-Git-Tag: v2.6.24-rc3~153^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70433389ccfe2719ef5cd539d04172260294f0f5;p=linux-2.6 KVM: SVM: Fix SMP with kernel apic AP processor needs to reset to the SIPI vector, not normal INIT. Signed-off-by: Avi Kivity --- diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index 729f1cd936..3910358db7 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -561,6 +561,12 @@ static void svm_vcpu_reset(struct kvm_vcpu *vcpu) struct vcpu_svm *svm = to_svm(vcpu); init_vmcb(svm->vmcb); + + if (vcpu->vcpu_id != 0) { + svm->vmcb->save.rip = 0; + svm->vmcb->save.cs.base = svm->vcpu.sipi_vector << 12; + svm->vmcb->save.cs.selector = svm->vcpu.sipi_vector << 8; + } } static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id)