diff options
author | Avi Kivity <avi@qumranet.com> | 2007-11-07 05:57:23 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-11-08 05:05:36 -0500 |
commit | 70433389ccfe2719ef5cd539d04172260294f0f5 (patch) | |
tree | 3e09b11482284749b85f3c360533df7b9b86a0a5 /drivers/kvm | |
parent | 1e35d3c4a7a9682256c887a1388cf3faefdf53df (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')
-rw-r--r-- | drivers/kvm/svm.c | 6 |
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 | ||
566 | static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) | 572 | static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) |