Skip to content

Commit

Permalink
KVM: SVM: Fix SMP with kernel apic
Browse files Browse the repository at this point in the history
AP processor needs to reset to the SIPI vector, not normal INIT.

Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Avi Kivity committed Nov 8, 2007
1 parent 1e35d3c commit 7043338
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7043338

Please sign in to comment.