From: Avi Kivity Date: Wed, 7 Nov 2007 10:57:23 +0000 (+0200) Subject: KVM: SVM: Fix SMP with kernel apic X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=70433389ccfe2719ef5cd539d04172260294f0f5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 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) 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)