From 70433389ccfe2719ef5cd539d04172260294f0f5 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Wed, 7 Nov 2007 12:57:23 +0200 Subject: [PATCH] KVM: SVM: Fix SMP with kernel apic AP processor needs to reset to the SIPI vector, not normal INIT. Signed-off-by: Avi Kivity --- drivers/kvm/svm.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.39.5